From 80990f5bdc8eebeffa0cbb8e2c525ad268ed5cea Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Wed, 3 Feb 2021 07:06:16 -0700 Subject: [PATCH] mgr/cephadm: Redefinition of unused name from line n (F811) Signed-off-by: Michael Fritch --- src/pybind/mgr/cephadm/module.py | 5 ----- src/pybind/mgr/cephadm/services/cephadmservice.py | 2 +- src/pybind/mgr/cephadm/tests/test_scheduling.py | 2 +- src/pybind/mgr/tox.ini | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 40d1be8b039e..1532bcb2bad6 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 8dfb1501d7f0..a72a0e7d9086 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 47d7ba54c407..d59b2ed9377a 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 ab0380419804..7cd60b24bcbc 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, -- 2.47.3