Skip to content

inconsistent behavior depending on the file path being checked #11697

Open
@KotlinIsland

Description

@KotlinIsland

given:

projects/
├─ mypy/
│  ├─ a.py
│  ├─ b.py
├─ other/
│  ├─ a.py
│  ├─ b.py

a.py:

from b import b

b.py:

b: int = ""
>mypy projects/mypy/a.py
Success: no issues found in 1 source file
>mypy projects/other/a.py
b.py:1: error: Incompatible types in assignment (expression has type "int", variable has type "str")
Found 1 error in 1 file (checked 1 source file)

I have no idea whats going on here, I can consistently reproduce it with these folders(projects/mypy), but not any other folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions