1
0
mirror of https://github.com/ceph/ceph synced 2025-04-01 23:02:17 +00:00

Merge pull request from sebastian-philipp/mypy-constrains.txt

global,tox.ini: add mypy-constrains.txt

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Patrick Seidensal <pseidensal@suse.com>
This commit is contained in:
Sebastian Wagner 2021-06-16 13:54:31 +02:00 committed by GitHub
commit 6ce6874bae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 6 deletions

View File

@ -11,7 +11,7 @@ commands=flake8 --select=F,E9 --exclude=venv,.tox
[testenv:mypy]
basepython = python3
deps =
mypy==0.901
mypy
types-boto
types-requests
types-jwt
@ -19,6 +19,7 @@ deps =
types-PyYAML
types-cryptography
types-python-dateutil
-c{toxinidir}/../src/mypy-constrains.txt
commands = mypy {posargs:.}
[testenv:import-tasks]

View File

@ -41,7 +41,9 @@ commands=pytest {posargs}
[testenv:mypy]
basepython = python3
deps = mypy==0.901
deps =
mypy
-c{toxinidir}/../mypy-constrains.txt
commands = mypy --config-file ../mypy.ini {posargs:cephadm}
[testenv:fix]

19
src/mypy-constrains.txt Normal file
View File

@ -0,0 +1,19 @@
# let's avoid getting new versions of those packages by accident.
# Unfortunately this means we have to manually update those
# packages regularly.
mypy==0.901
# global
types-python-dateutil==0.1.3
types-requests==0.1.11
types-jwt==0.1.3
types-PyYAML==5.4.0
# src/pybind
types-backports==0.1.2
# qa/
types-boto==0.1.0
types-cryptography==0.1.1
types-paramiko==0.1.3

View File

@ -58,7 +58,8 @@ basepython = python3
deps =
cython
-rrequirements.txt
mypy==0.901
-c{toxinidir}/../../mypy-constrains.txt
mypy
types-backports
types-python-dateutil
types-requests

View File

@ -7,7 +7,9 @@ skipsdist = true
[testenv]
[testenv:mypy]
deps = mypy
deps =
mypy
-c{toxinidir}/../mypy-constrains.txt
commands =
python -m mypy --config-file ../mypy.ini \
-m ceph_daemon \

View File

@ -1,8 +1,8 @@
pytest >=2.1.3,<5; python_version < '3.5'
mock; python_version < '3.3'
mypy==0.901; python_version >= '3'
mypy; python_version >= '3'
pytest-mypy; python_version >= '3'
pytest >= 2.1.3; python_version >= '3'
pyyaml
typing-extensions; python_version < '3.8'
types-PyYAML
types-PyYAML

View File

@ -5,6 +5,7 @@ skip_missing_interpreters = true
[testenv:py3]
deps=
-rrequirements.txt
-c{toxinidir}/../mypy-constrains.txt
commands=
pytest --doctest-modules ceph/deployment/service_spec.py
pytest {posargs}