Skip to content

Source file found twice under different module names mypy #19284

Closed as not planned
@Tusenka

Description

@Tusenka

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongpendingIssues that may be closed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions