diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0cea6a1..6429ddb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,15 +6,15 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 24.2.0 + rev: 24.3.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.1 + rev: v0.3.4 hooks: - id: ruff - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.8.0' + rev: 'v1.9.0' hooks: - id: mypy additional_dependencies: [pydantic, types-requests, types-pytz, types-setuptools, types-urllib3, StrEnum] diff --git a/horde_sdk/ai_horde_api/apimodels/workers/_workers_all.py b/horde_sdk/ai_horde_api/apimodels/workers/_workers_all.py index 09d6f01..839389e 100644 --- a/horde_sdk/ai_horde_api/apimodels/workers/_workers_all.py +++ b/horde_sdk/ai_horde_api/apimodels/workers/_workers_all.py @@ -1,7 +1,6 @@ from collections.abc import Iterator -from typing import ClassVar -from pydantic import AliasChoices, ConfigDict, Field, RootModel +from pydantic import AliasChoices, Field, RootModel from typing_extensions import override from horde_sdk.ai_horde_api.apimodels.base import BaseAIHordeRequest @@ -130,8 +129,6 @@ def __hash__(self) -> int: class AllWorkersDetailsResponse(HordeResponse, RootModel[list[WorkerDetailItem]]): - model_config: ClassVar[ConfigDict] = {} - # @tazlin: The typing of __iter__ in BaseModel seems to assume that RootModel wouldn't also be a parent class. # without a `type: ignore``, mypy feels that this is a bad override. This is probably a sub-optimal solution # on my part with me hoping to come up with a more elegant path in the future. diff --git a/pyproject.toml b/pyproject.toml index 415b072..abd0538 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,9 @@ tests = ["*.json"] [tool.ruff] line-length = 119 +exclude = ["codegen"] + +[tool.ruff.lint] select = [ "A", "I", @@ -70,9 +73,8 @@ ignore = [ "D408", "D409", "D413",] -exclude = ["codegen"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "__init__.py" = ["E402"] "conftest.py" = ["E402"] diff --git a/requirements.dev.txt b/requirements.dev.txt index dc2c2b7..0ddc69a 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -1,9 +1,9 @@ -pytest==8.0.0 -mypy==1.8.0 -black==24.2.0 -ruff==0.2.1 -tox~=4.12.1 -pre-commit~=3.6.1 +pytest==8.1.1 +mypy==1.9.0 +black==24.3.0 +ruff==0.3.4 +tox~=4.14.2 +pre-commit~=3.7.0 build>=0.10.0 coverage>=7.2.7