-
-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
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
def foo(*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?
Version Information
$ flake8 --version
4.0.1 (black: 0.2.3, flake8-annotations: 2.8.0, flake8-bugbear: 22.3.23,
flake8-docstrings: 1.6.0, pydocstyle: 6.1.1, mccabe: 0.6.1, pycodestyle:
2.8.0, pyflakes: 2.4.0) CPython 3.7.13 on DarwinAs well as your Python version:
$ python -V
Python 3.9.12kjelljorner, languitar and edgarrmondragon
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request