pre-commit: Bump versions
We also bump the typing dependencies which allows us to remove some ignore comments. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: I3c5963bef94d2d53df9334d386361545dd1ea21a
This commit is contained in:
@@ -13,24 +13,24 @@ repos:
|
||||
- id: check-yaml
|
||||
files: .*\.(yaml|yml)$
|
||||
- repo: https://opendev.org/openstack/hacking
|
||||
rev: 7.0.0
|
||||
rev: 8.0.0
|
||||
hooks:
|
||||
- id: hacking
|
||||
additional_dependencies: []
|
||||
exclude: '^(doc|releasenotes|tools)/.*$'
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.13.0
|
||||
rev: v0.14.5
|
||||
hooks:
|
||||
- id: ruff
|
||||
- id: ruff-check
|
||||
args: ['--fix', '--unsafe-fixes']
|
||||
- id: ruff-format
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.17.1
|
||||
rev: v1.18.2
|
||||
hooks:
|
||||
- id: mypy
|
||||
additional_dependencies: [
|
||||
'types-requests',
|
||||
'types-WebOb>=1.8.0.20250319',
|
||||
'types-WebOb>=1.8.0.20250822',
|
||||
]
|
||||
# keep this in-sync with '[tool.mypy] exclude' in 'pyproject.toml'
|
||||
exclude: |
|
||||
|
||||
@@ -141,7 +141,7 @@ class ConfigurableMiddleware:
|
||||
"""Do whatever you'd like to the response."""
|
||||
return response
|
||||
|
||||
@webob.dec.wsgify(RequestClass=NoContentTypeRequest) # type: ignore
|
||||
@webob.dec.wsgify(RequestClass=NoContentTypeRequest)
|
||||
def __call__(
|
||||
self,
|
||||
req: webob.request.Request,
|
||||
|
||||
@@ -313,9 +313,7 @@ class CORS(base.ConfigurableMiddleware):
|
||||
return response
|
||||
|
||||
# Doublecheck for an OPTIONS request.
|
||||
# TODO(stephenfin): typeshed typing is incomplete and doesn't include
|
||||
# OPTIONS
|
||||
if request.method == 'OPTIONS': # type: ignore
|
||||
if request.method == 'OPTIONS':
|
||||
return self._apply_cors_preflight_headers(
|
||||
request=request, response=response
|
||||
)
|
||||
|
||||
@@ -77,22 +77,7 @@ select = ["E4", "E7", "E9", "F", "S", "UP"]
|
||||
python_version = "3.10"
|
||||
show_column_numbers = true
|
||||
show_error_context = true
|
||||
ignore_missing_imports = true
|
||||
follow_imports = "normal"
|
||||
check_untyped_defs = true
|
||||
warn_unused_ignores = false
|
||||
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
|
||||
strict = true
|
||||
# keep this in-sync with 'mypy.exclude' in '.pre-commit-config.yaml'
|
||||
exclude = '''
|
||||
(?x)(
|
||||
|
||||
Reference in New Issue
Block a user