We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Report
reveal_locals() doesn't show module globals that are annotated with type information.
To Reproduce
from typing import List global_var = [1, 2, 3] global_var_annotated: List[int] = [1, 2, 3] reveal_locals() def foo(): local_var = [1, 2, 3] local_var_annotated: List[int] = [1, 2, 3] reveal_locals()
Expected Behavior
A note on the global_var_annotated variable:
global_var_annotated
note: global_var_annotated: builtins.list[builtins.int]
Actual Behavior
global_var_annotated is missing from the revealed types:
note: Revealed local types are: note: global_var: builtins.list[builtins.int*] note: Revealed local types are: note: local_var: Any note: local_var_annotated: builtins.list[builtins.int]
Your Environment
The text was updated successfully, but these errors were encountered:
Why do you expect a global variable to appear in the output for reveal locals?
Sorry, something went wrong.
The fact that it shows global_var but not global_var_annotated seems like a bug though.
global_var
Oh I see, I thought the complaint was about the second revealed local types not including it.
@jhance - the example "global_*" vars are locals to the module. And yep, @JelleZijlstra - correct, the missing annotated var feels like a bug?
No branches or pull requests
Bug Report
reveal_locals() doesn't show module globals that are annotated with type information.
To Reproduce
Expected Behavior
A note on the
global_var_annotated
variable:Actual Behavior
global_var_annotated
is missing from the revealed types:Your Environment
The text was updated successfully, but these errors were encountered: