Skip to content

Commit

Permalink
add pydantic.mypy - add to install list for mypy and tests in nox
Browse files Browse the repository at this point in the history
  • Loading branch information
tilen1976 committed Aug 6, 2024
1 parent 000b07d commit 06a690f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
16 changes: 14 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,17 @@ def mypy(session: Session) -> None:
"""Type-check using mypy."""
args = session.posargs or ["src", "tests"]
session.install(".")
session.install("mypy", "pytest")
session.install(
"mypy",
"pytest",
"types-setuptools",
"pandas-stubs",
"pyarrow-stubs",
"types-Pygments",
"types-colorama",
"types-beautifulsoup4",
"faker",
)
session.run("mypy", *args)
if not session.posargs:
session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py")
Expand All @@ -153,7 +163,9 @@ def mypy(session: Session) -> None:
def tests(session: Session) -> None:
"""Run the test suite."""
session.install(".")
session.install("coverage[toml]", "pytest", "pygments")
session.install(
"coverage[toml]", "pytest", "pygments", "pytest-mock", "requests-mock", "faker"
)
try:
session.run(
"coverage",
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ show_missing = true
fail_under = 80

[tool.mypy]
plugins = [
"pydantic.mypy"
]
strict = false
warn_unreachable = true
pretty = true
Expand Down

0 comments on commit 06a690f

Please sign in to comment.