]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/windows: alter python default argument types
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 20 Jan 2024 15:57:42 +0000 (10:57 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 24 Jan 2024 18:33:29 +0000 (13:33 -0500)
Found using mypy 1.1.1.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
qa/workunits/windows/test_rbd_wnbd.py

index db14234a2b5f0823e45dcbbd1e803f1f5ba87359..f233876cb35aa9493dfe5fe578d5765d2a0cb78d 100644 (file)
@@ -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)