From: Sage Weil Date: Thu, 5 Mar 2020 16:58:15 +0000 (-0600) Subject: python-common: fix lint errors X-Git-Tag: v15.1.1~75^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=50a656047c2134388663445af301976b59bd980c;p=ceph-ci.git python-common: fix lint errors 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 --- diff --git a/src/python-common/ceph/deployment/drive_selection/filter.py b/src/python-common/ceph/deployment/drive_selection/filter.py index 106d9a1e710..36cacfaa5cc 100644 --- a/src/python-common/ceph/deployment/drive_selection/filter.py +++ b/src/python-common/ceph/deployment/drive_selection/filter.py @@ -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 diff --git a/src/python-common/ceph/tests/test_disk_selector.py b/src/python-common/ceph/tests/test_disk_selector.py index 8bc0825a3bc..0d72c1d5a15 100644 --- a/src/python-common/ceph/tests/test_disk_selector.py +++ b/src/python-common/ceph/tests/test_disk_selector.py @@ -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