-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working
Description
Describe the bug
I am not too sure what is actually going on. I think that the code is the best way to describe the issue. The workaround works, so it is fine for now, but I do think there's a bug.
Code
from typing import Annotated, Type
def weird[T](p: tuple[Type[T], T]) -> Type[T]:
return Annotated[p[0], p[1]] # error: Expected type expression but received "tuple[type[T@weird], T@weird]"
# Alternatives:
t = p[0]
return Annotated[t, p[1]] # workaround, no error
return p[0] # not what I want, but no errorVS Code extension or command-line
On the command line, but pylance has the same issue.
pyright --version
pyright 1.1.347
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working