**Steps to reproduce:** 1. Clone from github repo: gh pr checkout 13421 2. Cd to the repo: cd pytest 3. Run mypy: mypy . or run prcommit: precommit --all-files **Expected:** All tests are passed. **Actual:** Source file found twice under different module names: "example_scripts.rewrite.src.main" and "testing.example_scripts.rewrite.src.main" Example of run: https://github.com/pytest-dev/pytest/pull/13421 **PS:** The `_init_` file exists and there are no relative imports of the failed file. **Duplicate:** Despite https://stackoverflow.com/questions/63871252/source-file-found-twice-error-with-mypy-0-780-in-python-for-vscode doesn't contain relative path.
Steps to reproduce:
Clone from github repo:
gh pr checkout 13421
Cd to the repo:
cd pytest
Run mypy:
mypy .
or
run prcommit:
precommit --all-files
Expected:
All tests are passed.
Actual:
Example of run:
pytest-dev/pytest#13421
PS:
The
_init_file exists and there are no relative imports of the failed file.Duplicate:
Despite https://stackoverflow.com/questions/63871252/source-file-found-twice-error-with-mypy-0-780-in-python-for-vscode doesn't contain relative path.