typing: Move configuration to pyproject.toml

The 'strict_concatenate' setting is not copied to resolve the following
warning:

  Warning: --strict-concatenate is deprecated; use --extra-checks instead

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I557c994d61593b767486d03b17e4c75eaea47f20
This commit is contained in:
Stephen Finucane 2024-10-21 14:31:13 +01:00
parent 8f58f5b7b9
commit 5b7ba604b4
2 changed files with 41 additions and 40 deletions

View File

@ -1,3 +1,44 @@
[tool.mypy]
show_column_numbers = true
show_error_context = true
ignore_missing_imports = true
follow_imports = "normal"
check_untyped_defs = true
warn_unused_ignores = true
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
strict_equality = true
disallow_untyped_decorators = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_reexport = true
extra_checks = true
# keep this in-sync with 'mypy.exclude' in '.pre-commit-config.yaml'
exclude = '''
(?x)(
doc
| examples
| releasenotes
)
'''
[[tool.mypy.overrides]]
module = ["keystoneauth1.tests.unit.*"]
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"keystoneauth1.fixture.*",
"keystoneauth1.hacking.*",
]
disallow_subclassing_any = false
disallow_untyped_defs = false
disallow_untyped_calls = false
[tool.ruff]
line-length = 79
target-version = "py38"

View File

@ -70,43 +70,3 @@ keystoneauth1.plugin =
v3multifactor = keystoneauth1.loading._plugins.identity.v3:MultiFactor
v3oauth2clientcredential = keystoneauth1.loading._plugins.identity.v3:OAuth2ClientCredential
v3oauth2mtlsclientcredential = keystoneauth1.loading._plugins.identity.v3:OAuth2mTlsClientCredential
[mypy]
show_column_numbers = true
show_error_context = true
ignore_missing_imports = true
follow_imports = normal
check_untyped_defs = true
warn_unused_ignores = true
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
strict_equality = true
strict_concatenate = true
disallow_untyped_decorators = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_reexport = true
extra_checks = true
# keep this in-sync with 'mypy.exclude' in '.pre-commit-config.yaml'
exclude = (?x)(
doc
| examples
| releasenotes
)
[mypy-keystoneauth1.tests.unit.*]
ignore_errors = true
[mypy-keystoneauth1.hacking.*]
disallow_subclassing_any = false
disallow_untyped_defs = false
disallow_untyped_calls = false
[mypy-keystoneauth1.fixture.*]
disallow_subclassing_any = false
disallow_untyped_defs = false
disallow_untyped_calls = false