From: Kefu Chai Date: Sun, 17 Jan 2021 02:19:53 +0000 (+0800) Subject: pybind/mgr/iostat: minor cleanups X-Git-Tag: v17.1.0~3164^2~20 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3422ba1bfc13e92f9df0af50790c69ac9385f4fa;p=ceph.git pybind/mgr/iostat: minor cleanups * do not pass typename and self to super() * do not add parentheses around condition expression Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/iostat/module.py b/src/pybind/mgr/iostat/module.py index 220bf928097b1..5c18f5bf0a022 100644 --- a/src/pybind/mgr/iostat/module.py +++ b/src/pybind/mgr/iostat/module.py @@ -3,7 +3,7 @@ from mgr_module import CLIReadCommand, HandleCommandResult, MgrModule class Module(MgrModule): def __init__(self, *args, **kwargs): - super(Module, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def self_test(self): r = self.get('io_rate') @@ -31,7 +31,7 @@ class Module(MgrModule): r = self.get('io_rate') stamp_delta = int(float(r['pg_stats_delta']['stamp_delta'])) - if (stamp_delta > 0): + if stamp_delta > 0: rd = r['pg_stats_delta']['stat_sum']['num_read_kb'] // stamp_delta wr = r['pg_stats_delta']['stat_sum']['num_write_kb'] // stamp_delta # The values are in kB, but to_pretty_iec() requires them to be in bytes