Skip to content

Commit

Permalink
Bump hikari to 2.0.0 (stable) (#29)
Browse files Browse the repository at this point in the history
* Bump hikari to stable, match Python version support

* Fix tests & pipelines

* Add newline at end of requirements.txt

* revert formatting changes

* update pytest Python versions

* bump pytest action versions

* re-apply the nox formatter changes
  • Loading branch information
lukasthaler authored Oct 8, 2024
1 parent b5207fd commit 32a5057
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 24 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
os: [ ubuntu-latest ]
fail-fast: false

name: ${{ matrix.python-version }} ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
architecture: x64
- name: pytest via nox
run: |
python -m pip install nox
Expand Down
4 changes: 2 additions & 2 deletions doc_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
furo~=2022.1.2
sphinx==4.4.0
furo==2024.04.27
sphinx==7.4.7
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 120
target-version = ["py38"]
target-version = ["py39"]
include = ".*py$"

[tool.isort]
Expand All @@ -17,7 +17,7 @@ namespace_packages = true
no_implicit_optional = true
implicit_reexport = true
pretty = true
python_version = 3.8
python_version = 3.9
show_column_numbers = true
show_error_codes = true
show_error_context = true
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
hikari>=2.0.0.dev122
hikari>=2.0.0
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ def parse_requirements_file(path):
':sys_platform=="win32"': ["colorama"],
"docs": parse_requirements_file("doc_requirements.txt"),
},
python_requires=">=3.8.0,<3.13",
python_requires=">=3.9.0,<3.14",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"Natural Language :: English",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries",
Expand Down
1 change: 1 addition & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def make_member(roles: list[hikari.Role] = None):
role_ids=[role.id for role in roles],
user=None,
guild_avatar_hash=None,
guild_flags=None,
)

GLOBAL_ROLES[id(member)] = roles
Expand Down
18 changes: 6 additions & 12 deletions toolbox/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,27 @@ def _list_to_command_choices(


@t.overload
def as_command_choices(choices: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]:
...
def as_command_choices(choices: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ...


@t.overload
def as_command_choices(choices: t.Sequence[t.Sequence[ChoiceTypes]]) -> t.Sequence[hikari.CommandChoice]:
...
def as_command_choices(choices: t.Sequence[t.Sequence[ChoiceTypes]]) -> t.Sequence[hikari.CommandChoice]: ...


@t.overload
def as_command_choices(choices: t.Dict[str, ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]:
...
def as_command_choices(choices: t.Dict[str, ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ...


@t.overload
def as_command_choices(*args: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]:
...
def as_command_choices(*args: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: ...


@t.overload
def as_command_choices(*args: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]:
...
def as_command_choices(*args: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ...


@t.overload
def as_command_choices(**kwargs: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]:
...
def as_command_choices(**kwargs: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: ...


def as_command_choices(*args: t.Any, **kwargs: t.Any) -> t.Sequence[hikari.CommandChoice]:
Expand Down
3 changes: 2 additions & 1 deletion toolbox/strings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import datetime
import re
import typing as t
from enum import Enum, IntFlag
from enum import Enum
from enum import IntFlag

__all__: t.Sequence[str] = (
"format_dt",
Expand Down

0 comments on commit 32a5057

Please sign in to comment.