From: John Mulligan Date: Sat, 20 Jan 2024 15:57:42 +0000 (-0500) Subject: qa/workunits/windows: alter python default argument types X-Git-Tag: v19.1.0~412^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1b5a12b5699f5bbaa0a03f706c6b4045b79a4f38;p=ceph.git qa/workunits/windows: alter python default argument types Found using mypy 1.1.1. Signed-off-by: John Mulligan --- diff --git a/qa/workunits/windows/test_rbd_wnbd.py b/qa/workunits/windows/test_rbd_wnbd.py index db14234a2b5f0..f233876cb35aa 100644 --- a/qa/workunits/windows/test_rbd_wnbd.py +++ b/qa/workunits/windows/test_rbd_wnbd.py @@ -75,7 +75,7 @@ parser.add_argument('--skip-cleanup-on-error', action='store_true', class CephTestException(Exception): msg_fmt = "An exception has been encountered." - def __init__(self, message: str = None, **kwargs): + def __init__(self, message: str = '', **kwargs): self.kwargs = kwargs if not message: message = self.msg_fmt % kwargs @@ -520,7 +520,7 @@ class RbdTest(object): @classmethod def print_results(cls, title: str = "Test results", - description: str = None): + description: str = ''): pass @@ -551,7 +551,7 @@ class RbdFioTest(RbdTest): def __init__(self, *args, - fio_size_mb: int = None, + fio_size_mb: int = 0, iterations: int = 1, workers: int = 1, bs: str = "2M", @@ -603,7 +603,7 @@ class RbdFioTest(RbdTest): return self.image.path @Tracer.trace - def _run_fio(self, fio_size_mb=None): + def _run_fio(self, fio_size_mb: int = 0) -> None: LOG.info("Starting FIO test.") cmd = [ "fio", "--thread", "--output-format=json", @@ -628,7 +628,7 @@ class RbdFioTest(RbdTest): @classmethod def print_results(cls, title: str = "Benchmark results", - description: str = None): + description: str = ''): if description: title = "%s (%s)" % (title, description)