From: John Mulligan Date: Fri, 1 Nov 2024 17:43:01 +0000 (-0400) Subject: python-common/deployment: update some type annotations X-Git-Tag: v20.0.0~647^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dc625594af7642b0cd6486856c8c3b1627d0cb3f;p=ceph.git python-common/deployment: update some type annotations flake8 flagged unused imports in this file due to the use of old style type comments. This file was easy to convert to new style annotations so that was done. Part of an effort to get ceph tox environments passing on Python 3.12. Signed-off-by: John Mulligan --- diff --git a/src/python-common/ceph/deployment/drive_selection/filter.py b/src/python-common/ceph/deployment/drive_selection/filter.py index 0da1b5c3901f..28f63ddc2f21 100644 --- a/src/python-common/ceph/deployment/drive_selection/filter.py +++ b/src/python-common/ceph/deployment/drive_selection/filter.py @@ -15,12 +15,10 @@ logger = logging.getLogger(__name__) class FilterGenerator(object): - def __init__(self, device_filter): - # type: (DeviceSelection) -> None + def __init__(self, device_filter: DeviceSelection) -> None: self.device_filter = device_filter - def __iter__(self): - # type: () -> Generator[Matcher, None, None] + def __iter__(self) -> Generator[Matcher, None, None]: if self.device_filter.actuators: yield EqualityMatcher('actuators', self.device_filter.actuators) if self.device_filter.size: