[red-knot] Use Unknown | T_inferred for undeclared public symbols (#15674)
## Summary Use `Unknown | T_inferred` as the type for *undeclared* public symbols. ## Test Plan - Updated existing tests - New test for external `__slots__` modifications. - New tests for external modifications of public symbols.
This commit is contained in:
@@ -55,7 +55,7 @@ reveal_type("x" or "y" and "") # revealed: Literal["x"]
|
||||
## Evaluates to builtin
|
||||
|
||||
```py path=a.py
|
||||
redefined_builtin_bool = bool
|
||||
redefined_builtin_bool: type[bool] = bool
|
||||
|
||||
def my_bool(x) -> bool:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user