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
Describe the bug
I like the new ANN401 rule added in the v2.8.0 release.
However, one place where it's pretty common to use Any is in annotations for *args and **kwargs since they often (not always) can take mulitple types.
To Reproduce
deffoo(*args: Any, **kwargs: Any): ...
gives
test.py:1:10: ANN401 Dynamically typed expressions (typing.Any) are disallowed
test.py:1:23: ANN401 Dynamically typed expressions (typing.Any) are disallowed
Could we make checking these either an option to ANN401 or we could exclude them from ANN401 and make ANN402 should someone want to disallow Any for these unpackings?
I think this should be fairly straightforward, since the argument type is already being classified. I'll have to think about what error code approach I like best for the adjustment.
Describe the bug
I like the new ANN401 rule added in the v2.8.0 release.
However, one place where it's pretty common to use
Any
is in annotations for*args
and**kwargs
since they often (not always) can take mulitple types.To Reproduce
gives
Could we make checking these either an option to ANN401 or we could exclude them from ANN401 and make ANN402 should someone want to disallow
Any
for these unpackings?Version Information
As well as your Python version:
The text was updated successfully, but these errors were encountered: