From: Michael Fritch Date: Thu, 28 Jan 2021 19:50:42 +0000 (-0700) Subject: mgr/cephadm: undefined name 'channel' (F821) X-Git-Tag: v16.2.0~178^2~33 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0e9abf3c170ee64680b020f1ac0bb94b1468493;p=ceph.git mgr/cephadm: undefined name 'channel' (F821) Signed-off-by: Michael Fritch (cherry picked from commit 867c7423e505e3ce06bbac3a18e64fa2b4db3f14) --- 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 b95906088911..eb78992dea40 100644 --- a/src/pybind/mgr/orchestrator/_interface.py +++ b/src/pybind/mgr/orchestrator/_interface.py @@ -889,7 +889,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 4a277ce266f6..038fcc42c819 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,