Skip to content

Commit 5486c97

Browse files
dev: let mypy read its flags from pyproject.toml
mypy finds the config file on its own, so --config-file was redundant, and --scripts-are-modules is a setting rather than an invocation choice.
1 parent fb171d9 commit 5486c97

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎noxfile.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def typecheck_mypy(session: nox.Session) -> None:
219219
"""
220220
session.install("--group", "types")
221221
files = [str(path) for path in _tracked(".py", ".pyi")]
222-
session.run("mypy", "--config-file=pyproject.toml", "--scripts-are-modules", *files, *_posargs(session))
222+
session.run("mypy", *files, *_posargs(session))
223223

224224

225225
@nox.session(name="typecheck-ty", tags=["experimental"], allow_parallel=True, default=False)

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ filterwarnings = [
296296
mypy_path = "python"
297297
no_implicit_optional = true
298298
namespace_packages = false
299+
scripts_are_modules = true
299300
warn_redundant_casts = true
300301
warn_unreachable = true
301302
warn_unused_ignores = true

0 commit comments

Comments
 (0)