From 3422ba1bfc13e92f9df0af50790c69ac9385f4fa Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 17 Jan 2021 10:19:53 +0800 Subject: [PATCH] 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 --- src/pybind/mgr/iostat/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5