]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: missing whitespace after ':' (E231)
authorMichael Fritch <mfritch@suse.com>
Wed, 17 Feb 2021 04:05:04 +0000 (21:05 -0700)
committerMichael Fritch <mfritch@suse.com>
Wed, 3 Mar 2021 16:33:29 +0000 (09:33 -0700)
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/cephadm
src/cephadm/tox.ini

index 945db6199793c4c22e4c610cfa2bee1dd4ee9060..127bede65c3cdb58e32c46f60eeefed6eb86c7de 100755 (executable)
@@ -177,9 +177,9 @@ logging_config = {
         },
     },
     'handlers': {
-        'console':{
-            'level':'INFO',
-            'class':'logging.StreamHandler',
+        'console': {
+            'level': 'INFO',
+            'class': 'logging.StreamHandler',
         },
         'log_file': {
             'level': 'DEBUG',
@@ -695,7 +695,7 @@ class HAproxy(object):
     @staticmethod
     def get_container_mounts(data_dir: str) -> Dict[str, str]:
         mounts = dict()
-        mounts[os.path.join(data_dir,'haproxy')] = '/var/lib/haproxy'
+        mounts[os.path.join(data_dir, 'haproxy')] = '/var/lib/haproxy'
         return mounts
 
 ##################################
@@ -783,7 +783,7 @@ class Keepalived(object):
     @staticmethod
     def get_container_mounts(data_dir: str) -> Dict[str, str]:
         mounts = dict()
-        mounts[os.path.join(data_dir,'keepalived.conf')] = '/etc/keepalived/keepalived.conf'
+        mounts[os.path.join(data_dir, 'keepalived.conf')] = '/etc/keepalived/keepalived.conf'
         return mounts
 
 ##################################
@@ -3243,7 +3243,7 @@ def get_image_info_from_inspect(out, image):
 
 
 ##################################
-def check_subnet(subnets:str) -> Tuple[int, List[int], str]:
+def check_subnet(subnets: str) -> Tuple[int, List[int], str]:
     """Determine whether the given string is a valid subnet
 
     :param subnets: subnet string, a single definition or comma separated list of CIDR subnets
@@ -4652,9 +4652,9 @@ def list_daemons(ctx, detail=True, legacy_dir=None):
                             if not version or '.' not in version:
                                 version = seen_versions.get(image_id, None)
                             if daemon_type == NFSGanesha.daemon_type:
-                                version = NFSGanesha.get_version(ctx,container_id)
+                                version = NFSGanesha.get_version(ctx, container_id)
                             if daemon_type == CephIscsi.daemon_type:
-                                version = CephIscsi.get_version(ctx,container_id)
+                                version = CephIscsi.get_version(ctx, container_id)
                             elif not version:
                                 if daemon_type in Ceph.daemons:
                                     out, err, code = call(ctx,
@@ -5890,7 +5890,7 @@ def get_ipv6_address(ifname):
         field = iface_setting.split()
         if field[-1] == ifname:
             ipv6_raw = field[0]
-            ipv6_fmtd = ":".join([ipv6_raw[_p:_p + 4] for _p in range(0, len(field[0]),4)])
+            ipv6_fmtd = ":".join([ipv6_raw[_p:_p + 4] for _p in range(0, len(field[0]), 4)])
             # apply naming rules using ipaddress module
             ipv6 = ipaddress.ip_address(ipv6_fmtd)
             return "{}/{}".format(str(ipv6), int('0x{}'.format(field[2]), 16))
@@ -6389,7 +6389,7 @@ class HostFacts():
         out, _, _ = call_throws(self.ctx, ['sysctl', '-a'], verbosity=CallVerbosity.SILENT)
         if out:
             param_list = out.split('\n')
-            param_dict = {param.split(" = ")[0]:param.split(" = ")[-1] for param in param_list}
+            param_dict = {param.split(" = ")[0]: param.split(" = ")[-1] for param in param_list}
 
             # return only desired parameters
             if 'net.ipv4.ip_nonlocal_bind' in param_dict:
@@ -6603,14 +6603,14 @@ td,th {{
                 data = json.dumps(self.server.cephadm_cache.health)
 
             self.send_response(status_code)
-            self.send_header('Content-type','application/json')
+            self.send_header('Content-type', 'application/json')
             self.end_headers()
             self.wfile.write(data.encode('utf-8'))
         else:
             # Invalid GET URL
             bad_request_msg = "Valid URLs are: {}".format(', '.join(CephadmDaemonHandler.valid_routes))
             self.send_response(404, message=bad_request_msg)  # reason
-            self.send_header('Content-type','application/json')
+            self.send_header('Content-type', 'application/json')
             self.end_headers()
             self.wfile.write(json.dumps({"message": bad_request_msg}).encode('utf-8'))
     
index 21d287c7f6fdbf2bc2a86181c769d3f92961df54..82c194616a79816f666d85245bc3f947424d1786 100644 (file)
@@ -5,7 +5,6 @@ skipsdist=true
 [flake8]
 max-line-length = 100
 ignore =
-    E231,
     E241,
     E251,
     E261,