]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
python-common: fix lint errors
authorKiefer Chang <kiefer.chang@suse.com>
Wed, 23 Oct 2019 07:45:39 +0000 (15:45 +0800)
committerKiefer Chang <kiefer.chang@suse.com>
Wed, 23 Oct 2019 07:51:17 +0000 (15:51 +0800)
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
src/python-common/README.rst
src/python-common/ceph/deployment/drive_group.py
src/python-common/ceph/deployment/ssh_orchestrator.py
src/python-common/ceph/exceptions.py
src/python-common/ceph/tests/test_drive_group.py

index 7bd424f7a7b6c802ce05778f2ea312834f4ee95c..07f42fd147e2f9bf8c356beb6da2f4c591116f31 100644 (file)
@@ -6,15 +6,15 @@ functions usable throughout the Ceph project.
 
 Like for example:
 
--  All different Cython bindings
--  MGR modules
--  ``ceph`` command line interface and other Ceph tools.
--  Also external tools
+- All different Cython bindings.
+- MGR modules.
+- ``ceph`` command line interface and other Ceph tools.
+- Also external tools.
 
 Requirements
 ============
 
--  ``python-six``
+- ``python-six``
 
 Usage
 =====
index ff6719dea9f6c89ce1af65af82d3dae11d84a9ea..0bc97644b22b1aafe1928d2a17c43cbf77e6b171 100644 (file)
@@ -3,7 +3,6 @@ try:
     from typing import Optional, List, Dict
 except ImportError:
     pass
-
 import six
 
 
@@ -45,7 +44,8 @@ class DeviceSelection(object):
     def validate(self):
         props = [self.id_model, self.size, self.rotates, self.count]
         if self.paths and any(p is not None for p in props):
-            raise DriveGroupValidationError('DeviceSelection: `paths` and other parameters are mutually exclusive')
+            raise DriveGroupValidationError(
+                'DeviceSelection: `paths` and other parameters are mutually exclusive')
         if not any(p is not None for p in [self.paths] + props):
             raise DriveGroupValidationError('DeviceSelection cannot be empty')
 
@@ -58,6 +58,7 @@ class DriveGroupValidationError(Exception):
     def __init__(self, msg):
         super(DriveGroupValidationError, self).__init__('Failed to validate Drive Group: ' + msg)
 
+
 class DriveGroupSpec(object):
     """
     Describe a drive group in the same form that ceph-volume
@@ -147,4 +148,4 @@ class DriveGroupSpec(object):
             raise DriveGroupValidationError("objectstore not in ('filestore', 'bluestore')")
         if not self.hosts(all_hosts):
             raise DriveGroupValidationError(
-                "host_pattern '{}' does not match any hosts".format(self.host_pattern))
\ No newline at end of file
+                "host_pattern '{}' does not match any hosts".format(self.host_pattern))
index 2a81c527f5fe1b6577a8b5ac588ce5c3db1f0add..81c5fe9711dad8d57146efa0ae43bca94c7998e4 100644 (file)
@@ -1,10 +1,11 @@
-
 def bootstrap_cluster():
     create_mon()
     create_mgr()
 
+
 def create_mon():
     pass
 
+
 def create_mgr():
     pass
index 872bd8bbc7ec9780049414ec28773b5a06d12acc..9fe50496a7b83f4c901ba0bda0a71498242dd510 100644 (file)
@@ -10,13 +10,16 @@ class Error(Exception):
             return msg
         return '[errno {0}] {1}'.format(self.errno, msg)
 
+
 class InvalidArgumentError(Error):
     pass
 
+
 class OSError(Error):
     """ `OSError` class, derived from `Error` """
     pass
 
+
 class InterruptedOrTimeoutError(OSError):
     """ `InterruptedOrTimeoutError` class, derived from `OSError` """
     pass
@@ -84,4 +87,4 @@ class LogicError(Error):
 
 class TimedOut(OSError):
     """ `TimedOut` class, derived from `OSError` """
-    pass
\ No newline at end of file
+    pass
index 71a3a16d8740eb357ac35c64105889ea4038cd20..ca215bc36cddfa1c79522dff96f66440f808df34 100644 (file)
@@ -2,6 +2,7 @@ import pytest
 
 from ceph.deployment.drive_group import DriveGroupSpec, DeviceSelection, DriveGroupValidationError
 
+
 def test_DriveGroup():
     dg_json = {
         'host_pattern': 'hostname',