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