This commit is contained in:
burnettk 2022-10-20 18:44:08 -04:00
parent 68485ab4c4
commit 5e09e28da8
3 changed files with 32 additions and 27 deletions

View File

@ -132,7 +132,7 @@ def mypy(session: Session) -> None:
"""Type-check using mypy."""
args = session.posargs or ["src", "tests", "docs/conf.py"]
session.install(".")
session.install("mypy", "pytest", "sqlalchemy-stubs", "types-Werkzeug", "types-PyYAML", "types-Flask", "types-requests", "types-pytz")
session.install("mypy")
session.run("mypy", *args)
if not session.posargs:
session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py")

26
poetry.lock generated
View File

@ -1061,7 +1061,7 @@ mypy-extensions = "*"
name = "mypy"
version = "0.982"
description = "Optional static typing for Python"
category = "dev"
category = "main"
optional = false
python-versions = ">=3.7"
@ -1079,7 +1079,7 @@ reports = ["lxml"]
name = "mypy-extensions"
version = "0.4.3"
description = "Experimental type system extensions for programs checked with the mypy typechecker."
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -1903,7 +1903,7 @@ sqlcipher = ["sqlcipher3_binary"]
name = "sqlalchemy-stubs"
version = "0.4"
description = "SQLAlchemy stubs and mypy plugin"
category = "dev"
category = "main"
optional = false
python-versions = "*"
develop = false
@ -1988,7 +1988,7 @@ test = ["mypy", "pytest", "typing-extensions"]
name = "types-click"
version = "7.1.8"
description = "Typing stubs for click"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -1996,7 +1996,7 @@ python-versions = "*"
name = "types-Flask"
version = "1.1.6"
description = "Typing stubs for Flask"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -2009,7 +2009,7 @@ types-Werkzeug = "*"
name = "types-Jinja2"
version = "2.11.9"
description = "Typing stubs for Jinja2"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -2020,7 +2020,7 @@ types-MarkupSafe = "*"
name = "types-MarkupSafe"
version = "1.1.10"
description = "Typing stubs for MarkupSafe"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -2028,7 +2028,7 @@ python-versions = "*"
name = "types-pytz"
version = "2022.5.0.0"
description = "Typing stubs for pytz"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -2036,7 +2036,7 @@ python-versions = "*"
name = "types-PyYAML"
version = "6.0.12"
description = "Typing stubs for PyYAML"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -2044,7 +2044,7 @@ python-versions = "*"
name = "types-requests"
version = "2.28.11.2"
description = "Typing stubs for requests"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -2055,7 +2055,7 @@ types-urllib3 = "<1.27"
name = "types-urllib3"
version = "1.26.25.1"
description = "Typing stubs for urllib3"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -2063,7 +2063,7 @@ python-versions = "*"
name = "types-Werkzeug"
version = "1.0.9"
description = "Typing stubs for Werkzeug"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -2240,7 +2240,7 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
[metadata]
lock-version = "1.1"
python-versions = ">=3.9,<3.11"
content-hash = "ade6f6f6e57ee6d16f141b173a11ec52a77393c897c8007260aa8ae35a24c4d4"
content-hash = "29b4ba7f1afdf87ad0a336216ef71d2e2659cd1bd3baecb009efdaac2937737a"
[metadata.files]
alabaster = [

View File

@ -54,6 +54,24 @@ RestrictedPython = "^5.2"
Flask-SQLAlchemy = "^3"
orjson = "^3.8.0"
# type hinting stuff
# these need to be in the normal (non dev-dependencies) section
# because if not then poetry export won't have them and nox -s mypy --pythons 3.10
# will fail
types-Werkzeug = "^1.0.9"
types-PyYAML = "^6.0.12"
types-Flask = "^1.1.6"
types-requests = "^2.28.6"
types-pytz = "^2022.1.1"
# https://github.com/dropbox/sqlalchemy-stubs/pull/251
# someday get off github
# sqlalchemy-stubs = "^0.4"
# sqlalchemy-stubs = { git = "https://github.com/dropbox/sqlalchemy-stubs.git", rev = "master" }
# sqlalchemy-stubs = {develop = true, path = "/Users/kevin/projects/github/sqlalchemy-stubs"}
# for now use my fork
sqlalchemy-stubs = { git = "https://github.com/burnettk/sqlalchemy-stubs.git", rev = "scoped-session-delete" }
[tool.poetry.dev-dependencies]
pytest = "^7.1.2"
@ -68,11 +86,6 @@ pre-commit = "^2.20.0"
flake8 = "^4.0.1"
black = ">=21.10b0"
flake8-bandit = "^2.1.2"
types-Werkzeug = "^1.0.9"
types-PyYAML = "^6.0.12"
types-Flask = "^1.1.6"
types-requests = "^2.28.6"
types-pytz = "^2022.1.1"
# 1.7.3 broke us. https://github.com/PyCQA/bandit/issues/841
bandit = "1.7.2"
@ -91,14 +104,6 @@ pyupgrade = "^2.37.1"
furo = ">=2021.11.12"
MonkeyType = "^22.2.0"
# https://github.com/dropbox/sqlalchemy-stubs/pull/251
# someday get off github
# sqlalchemy-stubs = "^0.4"
# sqlalchemy-stubs = { git = "https://github.com/dropbox/sqlalchemy-stubs.git", rev = "master" }
# sqlalchemy-stubs = {develop = true, path = "/Users/kevin/projects/github/sqlalchemy-stubs"}
# for now use my fork
sqlalchemy-stubs = { git = "https://github.com/burnettk/sqlalchemy-stubs.git", rev = "scoped-session-delete" }
[tool.poetry.scripts]
spiffworkflow-backend = "spiffworkflow_backend.__main__:main"