From 867c7423e505e3ce06bbac3a18e64fa2b4db3f14 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Thu, 28 Jan 2021 12:50:42 -0700 Subject: [PATCH] mgr/cephadm: undefined name 'channel' (F821) Signed-off-by: Michael Fritch --- src/pybind/mgr/cephadm/remotes.py | 4 ++-- src/pybind/mgr/orchestrator/_interface.py | 2 +- src/pybind/mgr/tox.ini | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/cephadm/remotes.py b/src/pybind/mgr/cephadm/remotes.py index 9165a65048cc..0ad7006831d6 100644 --- a/src/pybind/mgr/cephadm/remotes.py +++ b/src/pybind/mgr/cephadm/remotes.py @@ -27,5 +27,5 @@ def choose_python(): if __name__ == '__channelexec__': - for item in channel: # type: ignore - channel.send(eval(item)) # type: ignore + for item in channel: # type: ignore # noqa: F821 + channel.send(eval(item)) # type: ignore # noqa: F821 diff --git a/src/pybind/mgr/orchestrator/_interface.py b/src/pybind/mgr/orchestrator/_interface.py index cb4c84975a94..2eb31d917010 100644 --- a/src/pybind/mgr/orchestrator/_interface.py +++ b/src/pybind/mgr/orchestrator/_interface.py @@ -887,7 +887,7 @@ class Orchestrator(object): """ Applies any spec """ - fns: Dict[str, function] = { + fns: Dict[str, Callable] = { 'alertmanager': self.apply_alertmanager, 'crash': self.apply_crash, 'grafana': self.apply_grafana, diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index 5334020eb334..65b1e08ac7f3 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -14,7 +14,6 @@ ignore = E501, F401, F811, - F821, F841, W291, W503, -- 2.47.3