Describe the bug
Star importing a TypeVar definition with the same name as a type var declared using the 3.13 syntax leads to strange behavior, seemingly caused by inconsistent name lookup. The errors look like
Cannot assign to attribute "val" for class "Foo[T@Foo]*". Type "T@Foo" is not assignable to type "T@Foo"
Code or Screenshots
Create two files:
foo.py:
from typing import TypeVar
T = TypeVar("T")
bar.py:
from .foo import *
class Foo[T]:
def __init__(self, val: T):
self.val: T = val
VS Code extension or command-line
This is using the VSCode extension version 1.1.405
Describe the bug
Star importing a
TypeVardefinition with the same name as a type var declared using the 3.13 syntax leads to strange behavior, seemingly caused by inconsistent name lookup. The errors look likeCode or Screenshots
Create two files:
foo.py:bar.py:VS Code extension or command-line
This is using the VSCode extension version
1.1.405