From 9837d5fdbe5c837eecc7f8bd3f3aa9bd00eb0c18 Mon Sep 17 00:00:00 2001 From: Nikita Tikhonov Date: Sat, 18 Nov 2023 20:19:02 +0300 Subject: [PATCH] Bump dependencies and fix small issues. --- README.md | 2 +- gd/__init__.py | 2 +- gd/memory/base.py | 8 +++---- gd/run_iterables.py | 6 +++--- pyproject.toml | 51 +++++++++++++++++++++++---------------------- 5 files changed, 35 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index dda1b1be..7679d8d3 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Or by directly specifying it in the configuration like so: ```toml [tool.poetry.dependencies] -"gd.py" = "^1.0.1" +"gd.py" = "^1.0.2" ``` Alternatively, you can add it directly from the source: diff --git a/gd/__init__.py b/gd/__init__.py index ca74fa72..ee4babd3 100644 --- a/gd/__init__.py +++ b/gd/__init__.py @@ -6,7 +6,7 @@ __title__ = "gd" __author__ = "nekitdev" __license__ = "MIT" -__version__ = "1.0.1" +__version__ = "1.0.2" from gd import ( api, diff --git a/gd/memory/base.py b/gd/memory/base.py index aec7313b..493ad323 100644 --- a/gd/memory/base.py +++ b/gd/memory/base.py @@ -40,13 +40,13 @@ class Struct(Base): VIRTUAL: ClassVar[bool] = DEFAULT_VIRTUAL @classmethod - @cache + @cache # type: ignore def reconstruct(cls: TS, config: PlatformConfig) -> TS: return struct(cls.PACKED, cls.VIRTUAL, config)(cls) @classmethod def reconstruct_for(cls: TS, state: AbstractState) -> TS: - return cls.reconstruct(state.config) + return cls.reconstruct(state.config) # type: ignore TU = TypeVar("TU", bound="Type[Union]") @@ -57,13 +57,13 @@ class Union(Base): """Represents `union` types.""" @classmethod - @cache + @cache # type: ignore def reconstruct(cls: TU, config: PlatformConfig) -> TU: return union(config)(cls) @classmethod def reconstruct_for(cls: TU, state: AbstractState) -> TU: - return cls.reconstruct(state.config) + return cls.reconstruct(state.config) # type: ignore S = TypeVar("S", bound=Struct) diff --git a/gd/run_iterables.py b/gd/run_iterables.py index c62c32e9..c3d445cb 100644 --- a/gd/run_iterables.py +++ b/gd/run_iterables.py @@ -4,7 +4,7 @@ from async_extensions.collect import collect_iterable_results from iters.async_utils import async_iter, async_list -from typing_aliases import AnyError, AnyIterable, is_instance +from typing_aliases import AnyErrorType, AnyIterable, is_instance from wraps.result import is_error __all__ = ("run_iterables",) @@ -13,7 +13,7 @@ async def run_iterables( - iterables: AnyIterable[AnyIterable[T]], *ignore: Type[AnyError] + iterables: AnyIterable[AnyIterable[T]], *ignore: AnyErrorType ) -> AsyncIterator[T]: coroutines = [async_list(iterable) async for iterable in async_iter(iterables)] @@ -23,7 +23,7 @@ async def run_iterables( if is_error(result): error = result.unwrap_error() - if is_instance(result, ignore): + if is_instance(error, ignore): continue raise error diff --git a/pyproject.toml b/pyproject.toml index 22383ce2..5a1cc44f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gd.py" -version = "1.0.1" +version = "1.0.2" description = "An API wrapper for Geometry Dash written in Python." authors = ["nekitdev"] license = "MIT" @@ -32,15 +32,15 @@ include = "gd" gd = "gd.main:gd" [tool.poetry.dependencies] -python = ">= 3.7" +python = ">= 3.8" -aiohttp = ">= 3.8.4" -click = ">= 8.1.3" -tqdm = ">= 4.65.0" +aiohttp = ">= 3.9.0" +click = ">= 8.1.7" +tqdm = ">= 4.66.1" yarl = ">= 1.9.2" attrs = ">= 23.1.0" -cattrs = "22.2.0" # ">= 23.1.3" +cattrs = ">= 23.2.1" pendulum = ">= 2.1.2" @@ -55,24 +55,26 @@ colors-core = ">= 1.0.1" async-extensions = ">= 1.4.1" iters = ">= 0.13.1" +funcs = ">= 0.8.0" + [tool.poetry.dependencies.lxml] -version = ">= 4.9.2" +version = ">= 4.9.3" optional = true [tool.poetry.dependencies.pillow] -version = ">= 9.5.0" +version = ">= 10.1.0" optional = true [tool.poetry.dependencies.pycryptodome] -version = ">= 3.18.0" +version = ">= 3.19.0" optional = true [tool.poetry.dependencies.fastapi] -version = ">= 0.95.2" +version = ">= 0.104.1" optional = true [tool.poetry.dependencies.uvicorn] -version = ">= 0.22.0" +version = ">= 0.24.0" optional = true extras = ["standard"] @@ -86,45 +88,44 @@ server = ["fastapi", "uvicorn"] optional = true [tool.poetry.group.format.dependencies] -black = "23.3.0" +black = "23.11.0" flake8-pyproject = "1.2.3" [tool.poetry.group.format.dependencies.flake8] -version = "6.0.0" +version = "6.1.0" python = ">= 3.8.1" [tool.poetry.group.format.dependencies.isort] version = "5.12.0" -python = ">= 3.8" [tool.poetry.group.check] optional = true [tool.poetry.group.check.dependencies] -mypy = "1.3.0" +mypy = "1.7.0" -types-pillow = "9.5.0.4" -types-tqdm = "4.65.0.1" +types-pillow = "10.1.0.2" +types-tqdm = "4.66.0.1" lxml-stubs = "0.4.0" [tool.poetry.group.test] optional = true [tool.poetry.group.test.dependencies] -pytest = "7.3.1" +pytest = "7.4.3" pytest-cov = "4.1.0" pytest-benchmark = "4.0.0" -pytest-asyncio = "0.21.0" +pytest-asyncio = "0.21.1" [tool.poetry.group.docs] optional = true [tool.poetry.group.docs.dependencies] -mkdocs = "1.4.3" -mkdocs-material = "9.1.15" +mkdocs = "1.5.3" +mkdocs-material = "9.4.9" [tool.poetry.group.docs.dependencies.mkdocstrings] -version = "0.22.0" +version = "0.24.0" extras = ["python"] [tool.poetry.group.dev] @@ -137,7 +138,7 @@ changelogging = "1.3.0" optional = true [tool.poetry.group.build.dependencies] -maturin = "1.1.0" +maturin = "1.3.2" [tool.flake8] max_line_length = 100 @@ -205,7 +206,7 @@ warn_unused_ignores = false # compatibility [tool.changelogging] name = "gd.py" -version = "1.0.1" +version = "1.0.2" url = "https://github.com/nekitdev/gd.py" directory = "changes" output = "CHANGELOG.md" @@ -222,5 +223,5 @@ wrap_size = 100 display = ["feature", "change", "fix", "security", "deprecation", "removal", "internal"] [build-system] -requires = ["poetry-core >= 1.6.1", "maturin >= 1.1.0", "entrypoint >= 1.4.0"] +requires = ["poetry-core >= 1.8.1", "maturin >= 1.3.2", "entrypoint >= 1.4.0"] build-backend = "poetry.core.masonry.api"