[ty] don't allow first-party code to shadow stdlib types module (#19128)
This commit is contained in:
@@ -205,3 +205,18 @@ python-version = "3.13"
|
||||
import aifc # error: [unresolved-import]
|
||||
from distutils import sysconfig # error: [unresolved-import]
|
||||
```
|
||||
|
||||
## Cannot shadow core standard library modules
|
||||
|
||||
`types.py`:
|
||||
|
||||
```py
|
||||
x: int
|
||||
```
|
||||
|
||||
```py
|
||||
# error: [unresolved-import]
|
||||
from types import x
|
||||
|
||||
from types import FunctionType
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user