Static type analysis

This commit is contained in:
Joel Collins 2020-11-30 13:36:45 +00:00
parent 3aebb8bead
commit 7866ec0f47
63 changed files with 1825 additions and 2722 deletions

View file

@ -29,7 +29,7 @@ packages = [
]
[tool.poetry.dependencies]
python = "^3.6.1"
python = "^3.7.3"
Flask = "^1.0"
numpy = "1.19.2" # Exact version so we can guarantee a wheel
Pillow = "^7.2.0"
@ -43,7 +43,10 @@ expiringdict = "^1.2.1"
camera-stage-mapping = "0.1.4"
picamerax = ">=20.9.1"
pyyaml = "^5.3.1"
labthings = "^1.1.4"
labthings = {git = "https://github.com/labthings/python-labthings", develop = true}
typing-extensions = "^3.7.4" # Needed for some type-hints in Python < 3.8 (e.g. Literal)
pytest-cov = "^2.10.1"
piexif = "^1.1.3"
[tool.poetry.extras]
rpi = ["RPi.GPIO"]
@ -58,6 +61,9 @@ rope = "^0.14.0"
pylint = "^2.3"
black = {version = "^18.3-alpha.0",allow-prereleases = true}
pytest = "^6.1.2"
mypy = "^0.790"
poethepoet = "^0.9.0"
freezegun = "^1.0.0"
[tool.black]
exclude = '(\.eggs|\.git|\.venv|node_modules/)'
@ -73,3 +79,16 @@ line_length = 88
[tool.pylint.'MESSAGES CONTROL']
disable = "fixme,C,R"
max-line-length = 88
[tool.poe.tasks]
black = "black ."
black_check = "black --check ."
isort = "isort ."
pylint = "pylint openflexure_microscope"
mypy = "mypy openflexure_microscope"
test = "pytest ."
format = ["black", "isort"]
lint = ["pylint", "mypy"]
check = ["format", "lint", "test"]