]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: line break after binary operator (W504)
authorMichael Fritch <mfritch@suse.com>
Fri, 19 Feb 2021 15:09:49 +0000 (08:09 -0700)
committerSage Weil <sage@newdream.net>
Tue, 16 Mar 2021 12:56:16 +0000 (07:56 -0500)
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 7ac0479726b5d9ae925faff3c221f50e39547dd2)

src/cephadm/cephadm
src/cephadm/tox.ini

index e39138d8df3b46bf7ecb8547d79e68db0c248519..a76793ab90d647d3fbfe8504e82d6087d9eaba58 100755 (executable)
@@ -5224,9 +5224,9 @@ def command_rm_cluster(ctx):
          verbosity=CallVerbosity.DEBUG)
 
     # rm units
-    call_throws(ctx, ['rm', '-f', ctx.unit_dir +
+    call_throws(ctx, ['rm', '-f', ctx.unit_dir +  # noqa: W504
                       '/ceph-%s@.service' % ctx.fsid])
-    call_throws(ctx, ['rm', '-f', ctx.unit_dir +
+    call_throws(ctx, ['rm', '-f', ctx.unit_dir +  # noqa: W504
                       '/ceph-%s.target' % ctx.fsid])
     call_throws(ctx, ['rm', '-rf',
                       ctx.unit_dir + '/ceph-%s.target.wants' % ctx.fsid])
@@ -5234,7 +5234,7 @@ def command_rm_cluster(ctx):
     call_throws(ctx, ['rm', '-rf', ctx.data_dir + '/' + ctx.fsid])
     # rm logs
     call_throws(ctx, ['rm', '-rf', ctx.log_dir + '/' + ctx.fsid])
-    call_throws(ctx, ['rm', '-rf', ctx.log_dir +
+    call_throws(ctx, ['rm', '-rf', ctx.log_dir +  # noqa: W504
                       '/*.wants/ceph-%s@*' % ctx.fsid])
     # rm logrotate config
     call_throws(ctx, ['rm', '-f', ctx.logrotate_dir + '/ceph-%s' % ctx.fsid])
@@ -6409,9 +6409,8 @@ class HostFacts():
         """Return the attributes of this HostFacts object as json"""
         data = {
             k: getattr(self, k) for k in dir(self)
-            if not k.startswith('_') and
-            isinstance(getattr(self, k),
-                       (float, int, str, list, dict, tuple))
+            if not k.startswith('_')
+            and isinstance(getattr(self, k), (float, int, str, list, dict, tuple))
         }
         return json.dumps(data, indent=2, sort_keys=True)
 
index 8650076998fb3f04151df11d35b5894c6dd45fee..754e4ccfd11173ae1256a5a59c41fbfac714ee6c 100644 (file)
@@ -7,7 +7,6 @@ max-line-length = 100
 ignore =
     E501,
     W503,
-    W504,
 exclude =
     .tox,
     .vagrant,