]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: closing bracket does not match visual indentation (E124)
authorMichael Fritch <mfritch@suse.com>
Fri, 12 Feb 2021 16:20:49 +0000 (09:20 -0700)
committerMichael Fritch <mfritch@suse.com>
Wed, 3 Mar 2021 16:33:28 +0000 (09:33 -0700)
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/cephadm
src/cephadm/tox.ini

index 1ce01ce509bf0996c647c9bdc2c1afbe15cdef85..9b95f836952931e2c04948d2e73b3e58e41aa888 100755 (executable)
@@ -2510,11 +2510,12 @@ def deploy_daemon(ctx, fsid, daemon_type, daemon_id, c, uid, gid,
             ctx,
             image=ctx.image,
             entrypoint='/usr/bin/ceph-mon',
-            args=['--mkfs',
-                  '-i', str(daemon_id),
-                  '--fsid', fsid,
-                  '-c', '/tmp/config',
-                  '--keyring', '/tmp/keyring',
+            args=[
+                '--mkfs',
+                '-i', str(daemon_id),
+                '--fsid', fsid,
+                '-c', '/tmp/config',
+                '--keyring', '/tmp/keyring',
             ] + get_daemon_args(ctx, fsid, 'mon', daemon_id),
             volume_mounts={
                 log_dir: '/var/log/ceph:z',
@@ -2896,7 +2897,8 @@ def install_base_units(ctx, fsid):
     # cluster unit
     existed = os.path.exists(ctx.unit_dir + '/ceph-%s.target' % fsid)
     with open(ctx.unit_dir + '/ceph-%s.target.new' % fsid, 'w') as f:
-        f.write('[Unit]\n'
+        f.write(
+                '[Unit]\n'
                 'Description=Ceph cluster {fsid}\n'
                 'PartOf=ceph.target\n'
                 'Before=ceph.target\n'
@@ -3455,11 +3457,12 @@ def create_initial_monmap(
         ctx,
         image=ctx.image,
         entrypoint='/usr/bin/monmaptool',
-        args=['--create',
-              '--clobber',
-              '--fsid', fsid,
-              '--addv', mon_id, mon_addr,
-              '/tmp/monmap'
+        args=[
+            '--create',
+            '--clobber',
+            '--fsid', fsid,
+            '--addv', mon_id, mon_addr,
+            '/tmp/monmap'
         ],
         volume_mounts={
             monmap.name: '/tmp/monmap:z',
@@ -3487,12 +3490,13 @@ def prepare_create_mon(
         ctx,
         image=ctx.image,
         entrypoint='/usr/bin/ceph-mon',
-        args=['--mkfs',
-              '-i', mon_id,
-              '--fsid', fsid,
-              '-c', '/dev/null',
-              '--monmap', '/tmp/monmap',
-              '--keyring', '/tmp/keyring',
+        args=[
+            '--mkfs',
+            '-i', mon_id,
+            '--fsid', fsid,
+            '-c', '/dev/null',
+            '--monmap', '/tmp/monmap',
+            '--keyring', '/tmp/keyring',
         ] + get_daemon_args(ctx, fsid, 'mon', mon_id),
         volume_mounts={
             log_dir: '/var/log/ceph:z',
@@ -3861,9 +3865,7 @@ def command_bootstrap(ctx):
     (uid, gid) = extract_uid_gid(ctx)
 
     # create some initial keys
-    (mon_key, mgr_key, admin_key,
-     bootstrap_keyring, admin_keyring
-    ) = \
+    (mon_key, mgr_key, admin_key, bootstrap_keyring, admin_keyring) = \
         create_initial_keys(ctx, uid, gid, mgr_id)
 
     monmap = create_initial_monmap(ctx, uid, gid, fsid, mon_id, addr_arg)
@@ -6405,7 +6407,8 @@ class HostFacts():
     def dump(self):
         # type: () -> str
         """Return the attributes of this HostFacts object as json"""
-        data = {k: getattr(self, k) for k in dir(self)
+        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))
@@ -7036,9 +7039,10 @@ WantedBy=ceph-{fsid}.target
         with open(os.path.join(self.daemon_path, 'unit.run'), "w") as f:
             f.write(self.unit_run)
 
-        with open(os.path.join(self.ctx.unit_dir,
-                              f"{self.unit_name}.new"),
-                  "w"
+        with open(
+                os.path.join(self.ctx.unit_dir,
+                f"{self.unit_name}.new"),
+                "w"
         ) as f:
             f.write(self.unit_file)
             os.rename(
index 02d20abb13a6bf4b2ba8ce5a5335a4d50e70c75c..c6eb55981ba917e7a7cd771d1ee92d7ad7efdcb6 100644 (file)
@@ -5,7 +5,6 @@ skipsdist=true
 [flake8]
 max-line-length = 100
 ignore =
-    E124,
     E125,
     E126,
     E127,