From: Michael Fritch Date: Wed, 3 Feb 2021 14:06:16 +0000 (-0700) Subject: mgr/cephadm: Redefinition of unused name from line n (F811) X-Git-Tag: v17.1.0~3027^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F39153%2Fhead;p=ceph.git mgr/cephadm: Redefinition of unused name from line n (F811) Signed-off-by: Michael Fritch --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 40d1be8b039..1532bcb2bad 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -72,11 +72,6 @@ except ImportError as e: remoto = None remoto_import_error = str(e) -try: - from typing import List -except ImportError: - pass - logger = logging.getLogger(__name__) T = TypeVar('T') diff --git a/src/pybind/mgr/cephadm/services/cephadmservice.py b/src/pybind/mgr/cephadm/services/cephadmservice.py index 8dfb1501d7f..a72a0e7d908 100644 --- a/src/pybind/mgr/cephadm/services/cephadmservice.py +++ b/src/pybind/mgr/cephadm/services/cephadmservice.py @@ -3,7 +3,7 @@ import re import logging import subprocess from abc import ABCMeta, abstractmethod -from typing import TYPE_CHECKING, List, Callable, Any, TypeVar, Generic, \ +from typing import TYPE_CHECKING, List, Callable, TypeVar, Generic, \ Optional, Dict, Any, Tuple, NewType from mgr_module import HandleCommandResult, MonCommandFailed diff --git a/src/pybind/mgr/cephadm/tests/test_scheduling.py b/src/pybind/mgr/cephadm/tests/test_scheduling.py index 47d7ba54c40..d59b2ed9377 100644 --- a/src/pybind/mgr/cephadm/tests/test_scheduling.py +++ b/src/pybind/mgr/cephadm/tests/test_scheduling.py @@ -9,7 +9,7 @@ from ceph.deployment.hostspec import HostSpec from ceph.deployment.service_spec import ServiceSpec, PlacementSpec, ServiceSpecValidationError from cephadm.module import HostAssignment -from orchestrator import DaemonDescription, OrchestratorValidationError, OrchestratorError, HostSpec +from orchestrator import DaemonDescription, OrchestratorValidationError, OrchestratorError def wrapper(func): diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index ab038041980..7cd60b24bcb 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -12,7 +12,6 @@ requires = cython max-line-length = 100 ignore = E501, - F811, W503, exclude = .tox,