]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/mgr: use annotation style without comment
authorKefu Chai <tchaikov@gmail.com>
Thu, 24 Nov 2022 06:01:13 +0000 (14:01 +0800)
committerKefu Chai <tchaikov@gmail.com>
Thu, 24 Nov 2022 06:47:00 +0000 (14:47 +0800)
commit7894e7bdd1c25d86a71e3dcdc88c46062cb31101
treeeb9ef86e809a833578b099e65d3497faa06c6323
parent2413da8c854bc46e79ca8d6e84f789f99747c203
pybind/mgr: use annotation style without comment

* use annotation style without comment
* add noqa to import statement to prevent flake8 from complaining
  those which import typing modules

to silence the warnings like:

```
flake8 run-test: commands[0] | flake8 --config=tox.ini alerts balancer cephadm cli_api crash devicehealth diskprediction_local hello iostat localpool nfs orchestrator prometheus selftest
cephadm/schedule.py:5:1: F401 'typing.Callable' imported but unused
cephadm/schedule.py:8:1: F401 'ceph.deployment.service_spec.ServiceSpec' imported but unused
cephadm/tests/fixtures.py:17:1: F401 'orchestrator.OrchResult' imported but unused
orchestrator/module.py:4:1: F401 'typing.Set' imported but unused
orchestrator/module.py:17:1: F401 'ceph.deployment.inventory.Device' imported but unused
prometheus/module.py:17:1: F401 'typing.DefaultDict' imported but unused
6     F401 'typing.Callable' imported but unused
ERROR: InvocationError for command /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/.tox/flake8/bin/flake8 --config=tox.ini alerts
```

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/pybind/mgr/cephadm/schedule.py
src/pybind/mgr/cephadm/tests/fixtures.py
src/pybind/mgr/orchestrator/module.py
src/pybind/mgr/prometheus/module.py