I believe I have a False positive when annotating function argument with module extension in type #9045
Replies: 3 comments 2 replies
-
I'm not able to repro this issue with a recent version of pyright. Code sample in pyright playground Please verify your pyright version is up to date. If so, are there any additional steps required to repro the behavior you're seeing? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your time. Turns out I had a variable Both 1.1.380 and the current HEAD of main will show what I saw:
|
Beta Was this translation helpful? Give feedback.
-
Your bug fix lives to fight another battle! |
Beta Was this translation helpful? Give feedback.
-
Using python3.12, if I have the following:
I will get
Illegal type annotation: variable not allowed unless it is a type alias (PyRight reportGeneralTypeIssues)
If, however, I were to import
Any
from typing and use that as an annotation, I do not get an error.I have never had a problem with this in the past. Recently I did update my OS (and Python along with it), and this would be my first time using PyRight since.
Can anyone confirm that this is correct behavior, please?
Beta Was this translation helpful? Give feedback.
All reactions