Skip to content

Commit 5884bb5

Browse files
committed
re-add mypy to nox
1 parent 3902f14 commit 5884bb5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

noxfile.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
nox.options.sessions = (
2929
"pre-commit",
3030
"safety",
31-
# "mypy",
31+
"mypy",
3232
"tests",
3333
"typeguard",
3434
"xdoctest",
@@ -146,15 +146,15 @@ def safety(session: Session) -> None:
146146
session.run("safety", "check", "--full-report", f"--file={requirements}")
147147

148148

149-
# @session(python=python_versions)
150-
# def mypy(session: Session) -> None:
151-
# """Type-check using mypy."""
152-
# args = session.posargs or ["src", "tests", "docs/conf.py"]
153-
# session.install(".")
154-
# session.install("mypy", "pytest", "types-requests", "types-PyYAML")
155-
# session.run("mypy", *args)
156-
# if not session.posargs:
157-
# session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py")
149+
@session(python=python_versions)
150+
def mypy(session: Session) -> None:
151+
"""Type-check using mypy."""
152+
args = session.posargs or ["src", "tests", "docs/conf.py"]
153+
session.install(".")
154+
session.install("mypy", "pytest", "types-requests", "types-PyYAML")
155+
session.run("mypy", *args)
156+
if not session.posargs:
157+
session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py")
158158

159159

160160
@session(python=python_versions)

0 commit comments

Comments
 (0)