From 91b54fcabcdac2c6ce7af8a934a5292cf252d608 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Fri, 12 Feb 2021 09:20:49 -0700 Subject: [PATCH] cephadm: closing bracket does not match visual indentation (E124) Signed-off-by: Michael Fritch --- src/cephadm/cephadm | 52 ++++++++++++++++++++++++--------------------- src/cephadm/tox.ini | 1 - 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 1ce01ce509bf0..9b95f83695293 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -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( diff --git a/src/cephadm/tox.ini b/src/cephadm/tox.ini index 02d20abb13a6b..c6eb55981ba91 100644 --- a/src/cephadm/tox.ini +++ b/src/cephadm/tox.ini @@ -5,7 +5,6 @@ skipsdist=true [flake8] max-line-length = 100 ignore = - E124, E125, E126, E127, -- 2.39.5