ruff/scripts/pyproject.toml
Dhruv Manilawala f44acc047a
Check for Any in other types for ANN401 (#5601)
## Summary

Check for `Any` in other types for `ANN401`. This reuses the logic from
`implicit-optional` rule to resolve the type to `Any`.

Following types are supported:
* `Union[Any, ...]`
* `Any | ...`
* `Optional[Any]`
* `Annotated[<any of the above variant>, ...]`
* Forward references i.e., `"Any | ..."`

## Test Plan

Added test cases for various combinations.

fixes: #5458
2023-07-13 18:19:27 +05:30

26 lines
481 B
TOML

[project]
name = "scripts"
version = "0.0.1"
dependencies = ["sphinx"]
requires-python = ">=3.8"
[tool.black]
line-length = 88
[tool.ruff]
line-length = 88
select = ["ALL"]
ignore = [
"C901", # McCabe complexity
"D", # pydocstyle
"PL", # pylint
"S", # bandit
"G", # flake8-logging
"T", # flake8-print
"FBT", # flake8-boolean-trap
"PERF", # perflint
"ANN401",
]
[tool.ruff.isort]
required-imports = ["from __future__ import annotations"]