diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 02c64e35a..4e5135438 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: - requests-toolbelt==0.9.1 files: 'gitlab/' - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.961 + rev: v0.981 hooks: - id: mypy args: [] diff --git a/pyproject.toml b/pyproject.toml index 1ce5e857b..64734ba50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,24 +6,7 @@ order_by_type = false [tool.mypy] files = "." exclude = "build/.*" - -# 'strict = true' is equivalent to the following: -check_untyped_defs = true -disallow_any_generics = true -disallow_incomplete_defs = true -disallow_subclassing_any = true -disallow_untyped_decorators = true -disallow_untyped_defs = true -no_implicit_optional = true -no_implicit_reexport = true -strict_equality = true -warn_redundant_casts = true -warn_return_any = true -warn_unused_configs = true -warn_unused_ignores = true - -# The following need to have changes made to be able to enable them: -# disallow_untyped_calls = true +strict = true [[tool.mypy.overrides]] # Overrides for currently untyped modules module = [ @@ -33,10 +16,13 @@ module = [ "tests.functional.api.*", "tests.meta.*", "tests.unit.*", - "tests.smoke.*" ] ignore_errors = true +[[tool.mypy.overrides]] +module = "tests.smoke.*" +disable_error_code = ["no-untyped-def"] + [tool.semantic_release] branch = "main" version_variable = "gitlab/_version.py:__version__" diff --git a/requirements-lint.txt b/requirements-lint.txt index fa0678ba8..5aa4e3506 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -8,4 +8,4 @@ pylint==2.15.3 pytest==7.1.3 types-PyYAML==6.0.12 types-requests==2.28.11.2 -types-setuptools==64.0.1 +types-setuptools==65.5.0.1 diff --git a/tests/smoke/test_dists.py b/tests/smoke/test_dists.py index b951eca51..099e69145 100644 --- a/tests/smoke/test_dists.py +++ b/tests/smoke/test_dists.py @@ -18,9 +18,9 @@ @pytest.fixture(scope="function") -def build(): - sandbox.run_setup("setup.py", ["--quiet", "clean", "--all"]) - return sandbox.run_setup("setup.py", ["--quiet", "sdist", "bdist_wheel"]) +def build() -> None: + sandbox.run_setup("setup.py", ["--quiet", "clean", "--all"]) # type: ignore[no-untyped-call] + sandbox.run_setup("setup.py", ["--quiet", "sdist", "bdist_wheel"]) # type: ignore[no-untyped-call] def test_sdist_includes_tests(build):