Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.971: InvocationError and MYPYPATH issue when running "mypy src" with Tox on GitHub Actions #13370

Closed
jakob-bagterp opened this issue Aug 9, 2022 · 1 comment
Labels
bug mypy got something wrong

Comments

@jakob-bagterp
Copy link

Bug Report
With 0.961 and earlier versions, I used MyPy with Tox on GitHub Actions to run automated tests for three different projects. It has worked without issues, but after upgrading version 0.971, I'm getting an InvocationError even though I'm using the same basic mypy src command to scan my files across all projects.

Bug reports from GitHub Actions:

Screenshot 2022-08-09 at 20 38 17

Note that when running version 0.971 on my local machine, I experience no issues:

Screenshot 2022-08-09 at 20 35 23

To Reproduce

  1. Run MyPy version 0.971 with Tox on GitHub Actions
  2. Use command mypy src

Expected Behavior
MyPy should scan the code and exit without issues.

Actual Behavior
Error message:

/home/runner/work/name-of-project/name-of-project is in the MYPYPATH. Please remove it.

Your Environment

  • Mypy version used: 0.971
  • Mypy command-line flags: See configuration below
  • Python version used: 3.10
  • Operating system and version: Ubuntu via GitHub Actions
  • MyPy configuration options from setup.cfg:
[mypy]
mypy_path = $MYPY_CONFIG_FILE_DIR/src
disallow_any_unimported = True
no_implicit_reexport = True
show_error_codes = True
strict = True
warn_unreachable = True
  • MyPy configuration options from tox.ini:
[testenv:mypy]
basepython = python3.10
deps =
    -r{toxinidir}/requirements_dev.txt
commands = mypy src
@jakob-bagterp jakob-bagterp added the bug mypy got something wrong label Aug 9, 2022
@jakob-bagterp jakob-bagterp changed the title 0.971: InvocationError when running "mypy src" with Tox on GitHub Actions 0.971: InvocationError and MYPYPATH issue when running "mypy src" with Tox on GitHub Actions Aug 9, 2022
@hauntsaninja
Copy link
Collaborator

Thanks, duplicate of #13214
I fixed on master and asked for a release with the patch here: #13089 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

2 participants