diff --git a/cinder/scheduler/host_manager.py b/cinder/scheduler/host_manager.py index c4cc3edc706..1ddfcacf5e7 100644 --- a/cinder/scheduler/host_manager.py +++ b/cinder/scheduler/host_manager.py @@ -114,7 +114,7 @@ class BackendState(object): self.volume_backend_name = None self.vendor_name = None - self.driver_version = 0 + self.driver_version: Optional[int] = 0 self.storage_protocol = None self.QoS_support = False # Mutable available resources. @@ -259,6 +259,8 @@ class BackendState(object): # To get DEFAULT_POOL_NAME pool_name = volume_utils.extract_host(self.host, 'pool', True) + pool_name = typing.cast(str, pool_name) + if len(self.pools) == 0: # No pool was there single_pool = self.pool_state_cls(self.host, self.cluster_name, diff --git a/test-requirements.txt b/test-requirements.txt index 70e647ed5eb..54d087843ac 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -18,6 +18,6 @@ SQLAlchemy-Utils>=0.37.8 # BSD License testtools>=2.4.0 # MIT doc8>=0.8.1 # Apache-2.0 -mypy>=1.7.0,<1.16.0 # MIT +mypy>=1.7.0,<1.17.0 # MIT moto>=5.0.0 # Apache-2.0 distro>=1.8.0 # Apache-2.0