From b3d253722877cc63ba6aebd526dc3b235c22d97e Mon Sep 17 00:00:00 2001 From: Nejc Saje Date: Tue, 2 Dec 2025 13:24:37 +0100 Subject: [PATCH] clean up config --- .github/workflows/test.yaml | 2 +- pyproject.toml | 22 ++++++++++++- requirements-lint.txt | 1 + setup.cfg | 65 ------------------------------------- tasktiger/_internal.py | 2 +- 5 files changed, 24 insertions(+), 68 deletions(-) delete mode 100644 setup.cfg diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 21e72a65..7ac3c6fb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,7 +22,7 @@ jobs: - name: Lint code run: | pip install -c requirements.txt -r requirements-lint.txt - mypy . + mypy ruff check ruff format diff --git a/pyproject.toml b/pyproject.toml index d7ea8535..9e18582c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,23 @@ [tool.mypy] +warn_unused_configs = true +ignore_missing_imports = false +disallow_untyped_defs = true +disallow_incomplete_defs = true +no_implicit_optional = true +strict_equality = true +warn_unreachable = true +warn_unused_ignores = true +show_error_context = true +pretty = true +check_untyped_defs = true +python_version = "3.12" +files = [ + "tasktiger" +] + +[[tool.mypy.overrides]] +module = ["flask_script.*", "rollbar.*", "structlog.*"] ignore_missing_imports = true -follow_imports = "skip" + +[tool.pytest.ini_options] +testpaths = ["tests"] \ No newline at end of file diff --git a/requirements-lint.txt b/requirements-lint.txt index 416e5f6b..abb83206 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,3 +1,4 @@ mypy==1.19.0 ruff==0.14.7 types-redis +types-click diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 93851994..00000000 --- a/setup.cfg +++ /dev/null @@ -1,65 +0,0 @@ -[flake8] -ignore= - # TODO: Go over these and fix the ones we want to - B007, - B011, - D100, - D101, - D102, - D103, - D104, - D105, - D107, - D200, - D202, - D205, - D400, - D401, - D402, - D403, - D412, - E501, - M105, - M114, - M210, - M300, - M401, - M908, - N801, - N804, - N805, - N806, - N818, - S101, - S201, - S301, - W503, - SFS, - SIM, - -[tool:pytest] -testpaths=tests - -[mypy] -warn_unused_configs = True -ignore_missing_imports = False -disallow_untyped_defs = True -disallow_incomplete_defs = True -no_implicit_optional = True -strict_equality = True -warn_unreachable = True -warn_unused_ignores = True -show_error_context = True -pretty = True -check_untyped_defs = True -python_version = 3.10 -files = tasktiger - -[mypy-flask_script.*] -ignore_missing_imports = True - -[mypy-rollbar.*] -ignore_missing_imports = True - -[mypy-structlog.*] -ignore_missing_imports = True diff --git a/tasktiger/_internal.py b/tasktiger/_internal.py index fbfcf973..01c913e4 100644 --- a/tasktiger/_internal.py +++ b/tasktiger/_internal.py @@ -202,5 +202,5 @@ class classproperty(property): Works like @property but on classes. """ - def __get__(desc, self, cls): # type:ignore[no-untyped-def] + def __get__(desc, self, cls): # type:ignore[no-untyped-def,override] return desc.fget(cls) # type:ignore[misc]