]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr: use annotation style without comment 49059/head
authorKefu Chai <tchaikov@gmail.com>
Thu, 24 Nov 2022 06:01:13 +0000 (14:01 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 25 Nov 2022 12:01:05 +0000 (13:01 +0100)
commitf633c66548e840bd914b7a216683f1e93ff7dbfc
tree75c5a9b9205281c447525acbff3fae8acf3eacdf
parent3d974daf4bb45bbdfa687c2859bac9ff0df137e4
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>
(cherry picked from commit 7894e7bdd1c25d86a71e3dcdc88c46062cb31101)
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