You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you say, this is difficult to fix in pyanalyze because the AST doesn't distinguish between these cases. I'm personally not too bothered by this problem so I'm unlikely to introduce any new complexity to deal with it.
Possibly the Python AST could be changed to distinguish these cases, but I'm not sure that's likely. Before you open a CPython issue, I'd recommend coming up with a concrete proposal for what the AST should look like in both cases.
Closing as there's nothing here for pyanalyze to change.
According to typing spec tuple value inside a Literal type annotation is not allowed.
while I was playing around in #706 with it If found that the Literal value with a tuple parameter is treated the same with and without parentheses.
Is this intended behavior?
By the way Python ast parses these two expressions the same so finding out this would be difficult:
Does it worth to open an issue on Python repo about this?
The text was updated successfully, but these errors were encountered: