From fbebf106a576c398a78cee2e255cce9af3989e73 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 24 Feb 2025 16:00:29 +0000 Subject: [PATCH] deps: Bump minimum keystoneauth We want typing. Change-Id: I83cff62f92f942257f178921a6b94d49f25c69c9 Signed-off-by: Stephen Finucane --- .pre-commit-config.yaml | 2 +- openstack/utils.py | 6 +++--- pyproject.toml | 3 +-- requirements.txt | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 75b6fbbc5..118cf6153 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: hooks: - id: mypy additional_dependencies: - - keystoneauth1 + - keystoneauth1>=5.10.0 - types-decorator - types-PyYAML - types-requests diff --git a/openstack/utils.py b/openstack/utils.py index 62d21db4f..efde58e89 100644 --- a/openstack/utils.py +++ b/openstack/utils.py @@ -212,7 +212,7 @@ def supports_microversion( f'Required microversion {microversion} is higher than ' f'currently selected {adapter.default_microversion}' ) - return supports # type: ignore[no-any-return] + return supports return True @@ -276,7 +276,7 @@ def pick_microversion( 'Requested microversion is not supported by the server side ' 'or the default microversion is too low' ) - return discover.version_to_string(required_normalized) # type: ignore[no-any-return] + return discover.version_to_string(required_normalized) def maximum_supported_microversion( @@ -327,7 +327,7 @@ def maximum_supported_microversion( return None result = min(client_max, server_max) - return discover.version_to_string(result) # type: ignore[no-any-return] + return discover.version_to_string(result) def _hashes_up_to_date( diff --git a/pyproject.toml b/pyproject.toml index 7de016796..1fab36c2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,7 @@ show_error_context = true ignore_missing_imports = true follow_imports = "normal" check_untyped_defs = true -# TODO(stephenfin): Remove this when typed keystoneauth1 (5.10.0?) is released -warn_unused_ignores = false +warn_unused_ignores = true # many of the following are false while we incrementally add typing warn_return_any = false warn_unused_configs = true diff --git a/requirements.txt b/requirements.txt index a57c83ed3..b2a10c619 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ dogpile.cache>=0.6.5 # BSD iso8601>=0.1.11 # MIT jmespath>=0.9.0 # MIT jsonpatch!=1.20,>=1.16 # BSD -keystoneauth1>=3.18.0 # Apache-2.0 +keystoneauth1>=5.10.0 # Apache-2.0 os-service-types>=1.7.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0 platformdirs>=3 # MIT License