Type-check scripts/
This commit is contained in:
parent
f7a6aa1881
commit
d6b798a736
1 changed files with 9 additions and 6 deletions
|
|
@ -89,6 +89,8 @@ PACKAGE_LOCATION = "src/"
|
|||
DOCS_BUILD = ".cache/docs/"
|
||||
DOCS_LOCATION = "docs/"
|
||||
|
||||
SCRIPTS_LOCATION = "scripts/"
|
||||
|
||||
TESTS_LOCATION = "tests/"
|
||||
|
||||
# Locations of all *.py files
|
||||
|
|
@ -97,7 +99,7 @@ SRC_LOCATIONS = (
|
|||
"migrations/env.py",
|
||||
"migrations/versions/",
|
||||
NOXFILE_LOCATION,
|
||||
"scripts/",
|
||||
SCRIPTS_LOCATION,
|
||||
PACKAGE_LOCATION,
|
||||
TESTS_LOCATION,
|
||||
)
|
||||
|
|
@ -186,7 +188,7 @@ def lint_code(session: nox.Session) -> None:
|
|||
If no extra arguments are provided, all source files are linted.
|
||||
Otherwise, they are interpreted as paths the linters work on recursively.
|
||||
|
||||
`mypy` always checks the noxfile and the entire package regardless
|
||||
`mypy` always checks the noxfile, the scripts, and the package regardless
|
||||
because it needs the whole program to follow types across modules.
|
||||
"""
|
||||
start(session)
|
||||
|
|
@ -250,7 +252,7 @@ def lint_code(session: nox.Session) -> None:
|
|||
session.run("ruff", "check", *locations)
|
||||
|
||||
session.run("mypy", "--version")
|
||||
session.run("mypy", NOXFILE_LOCATION, PACKAGE_LOCATION)
|
||||
session.run("mypy", NOXFILE_LOCATION, SCRIPTS_LOCATION, PACKAGE_LOCATION)
|
||||
|
||||
|
||||
@nox.session(name="test", python=MAIN_PYTHON)
|
||||
|
|
|
|||
Loading…
Reference in a new issue