Skip to content

Commit a1c7b5d

Browse files
cephadm: update some type annotations
Update some function typing from the old comment based style to the current type annotations style. Not only does this modernize the code but it fixes issues found by newer versions of flake8 that were flagging types only referenced in type comments as unused imports. Part of an effort to get ceph tox environments passing on Python 3.12. Signed-off-by: John Mulligan <[email protected]>
1 parent bb58be8 commit a1c7b5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cephadm/cephadmlib/data_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ def normalize_image_digest(digest: str) -> str:
189189
return digest
190190

191191

192-
def get_legacy_config_fsid(cluster, legacy_dir=None):
193-
# type: (str, Optional[str]) -> Optional[str]
192+
def get_legacy_config_fsid(
193+
cluster: str, legacy_dir: Optional[str] = None
194+
) -> Optional[str]:
194195
config_file = '/etc/ceph/%s.conf' % cluster
195196
if legacy_dir is not None:
196197
config_file = os.path.abspath(legacy_dir + config_file)

0 commit comments

Comments
 (0)