From: Michael Fritch Date: Thu, 28 Jan 2021 19:50:42 +0000 (-0700) Subject: mgr/cephadm: undefined name 'channel' (F821) X-Git-Tag: v17.1.0~3027^2~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=867c7423e505e3ce06bbac3a18e64fa2b4db3f14;p=ceph.git mgr/cephadm: undefined name 'channel' (F821) Signed-off-by: Michael Fritch --- diff --git a/src/pybind/mgr/cephadm/remotes.py b/src/pybind/mgr/cephadm/remotes.py index 9165a65048cc1..0ad7006831d62 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 cb4c84975a948..2eb31d9170102 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 5334020eb334c..65b1e08ac7f3e 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,