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 <jmulligan@redhat.com>
##################################
-def check_time_sync(ctx, enabler=None):
- # type: (CephadmContext, Optional[Packager]) -> bool
+def check_time_sync(
+ ctx: CephadmContext, enabler: Optional[Packager] = None
+) -> bool:
units = [
'chrony.service', # 18.04 (at least)
'chronyd.service', # el / opensuse