]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr: use annotation style without comment 49058/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 14:03:44 +0000 (15:03 +0100)
commit03f21fd121aaa9e2b836a362eee5bd3935f14bd5
tree18f1cfaeddc80c22c37fced6ef00b155a03a830d
parentd8dac1dbf20c27d1ce3ebc6d1e3429e753b646b4
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)

Conflicts:
src/pybind/mgr/orchestrator/module.py [ commit 28314cebef32
  ("mgr/cephadm: Adding support for natural sorting") not in
  pacific ]
src/pybind/mgr/cephadm/services/exporter.py [ additional
  pacific-only change, this file doesn't exist in main ]
src/pybind/mgr/cephadm/schedule.py
src/pybind/mgr/cephadm/services/exporter.py
src/pybind/mgr/cephadm/tests/fixtures.py
src/pybind/mgr/orchestrator/module.py
src/pybind/mgr/prometheus/module.py