]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
python-common: fix lint errors
authorSage Weil <sage@redhat.com>
Thu, 5 Mar 2020 16:58:15 +0000 (10:58 -0600)
committerSage Weil <sage@redhat.com>
Thu, 5 Mar 2020 16:58:57 +0000 (10:58 -0600)
ceph/deployment/drive_selection/filter.py:8:5: F401 'typing.Optional' imported but unused
ceph/tests/test_disk_selector.py:5:1: F401 'ceph.deployment.drive_group.DriveGroupValidationError' imported but unused
ceph/tests/test_disk_selector.py:10:5: F401 'mock.patch' imported but unused

Signed-off-by: Sage Weil <sage@redhat.com>
src/python-common/ceph/deployment/drive_selection/filter.py
src/python-common/ceph/tests/test_disk_selector.py

index 106d9a1e71014e804976a0c82e6c56e324886705..36cacfaa5cc159fa0ab932e7a1e65802061bba23 100644 (file)
@@ -5,7 +5,7 @@ import logging
 from ceph.deployment.drive_group import DeviceSelection
 
 try:
-    from typing import Optional, Generator
+    from typing import Generator
 except ImportError:
     pass
 
index 8bc0825a3bce4a61f7640df1895bc122c99a0fdd..0d72c1d5a15ad34c40c61f5f56613f26ffe7ace4 100644 (file)
@@ -2,12 +2,7 @@ import pytest
 
 from ceph.deployment.inventory import Devices, Device
 
-from ceph.deployment.drive_group import DriveGroupSpec, DriveGroupValidationError, DeviceSelection
-
-try:
-    from unittest.mock import patch
-except ImportError:
-    from mock import patch  # type: ignore
+from ceph.deployment.drive_group import DriveGroupSpec, DeviceSelection
 
 from ceph.deployment import drive_selection
 from ceph.tests.factories import InventoryFactory