Do not run mypy for now

This commit is contained in:
Alexander Hess 2026-11-26 16:36:39 +01:00
commit e7d93a5496
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -191,7 +191,8 @@ def lint_code(session: Session) -> None:
'flake8-pyproject',
'flake8-pytest-style',
'isort',
'mypy',
# TODO: See comment on `mypy` below
# 'mypy',
)
# Interpret extra arguments as locations of source files.
@ -205,15 +206,12 @@ def lint_code(session: Session) -> None:
session.run('isort', '--version')
session.run('isort', '--check-only', *locations)
# For mypy, only lint *.py files to be packaged.
mypy_locations = [
path for path in locations if path.startswith(PACKAGE_SOURCE_LOCATION)
]
if mypy_locations:
session.run('mypy', '--version')
session.run('mypy', *mypy_locations)
else:
session.log('No paths to be checked with mypy')
# TODO: Include `mypy` once it passes
# - Only for the *.py files to be packaged
# - It then needs the developed package and its dependencies installed
# as it treats missing packages as `Any` and reports false successes
# session.run('mypy', '--version')
# session.run('mypy', PACKAGE_SOURCE_LOCATION)
@nox.session(name='test', python=MAIN_PYTHON)