mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:56 +00:00

## 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
26 lines
481 B
TOML
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"]
|