mirror of
https://github.com/astral-sh/ruff.git
synced 2026-10-28 10:45:37 +08:00
[ty] Enable return type inference in scripts and tools (#29439)
## Summary Enable return type inference for all 24 standalone Python scripts checked by ty in CI, along with `py-fuzzer` and `ty_benchmark`.
This commit is contained in:
1 parent
8d8252cb34
commit
c64734bcea
26 files changed
+78
No files matched your search
@@ -4,6 +4,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# requires-python = ">=3.11"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
# requires-python = ">=3.13"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
# "pathspec>=1.1.1",
|
||||
# ]
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = ["ruff"]
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# requires-python = ">=3.11"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = ["tqdm"]
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.13"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = ["stdlibs"]
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
# "pyyaml>=6.0.3",
|
||||
# ]
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.10"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
# requires-python = ">=3.11"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# requires-python = ">=3.11"
|
||||
# dependencies = ["mypy-primer"]
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -28,6 +28,9 @@ ignore = [
|
||||
"E501", # We use ruff format
|
||||
]
|
||||
|
||||
[tool.ty.analysis]
|
||||
return-type-inference = "always"
|
||||
|
||||
[tool.ty.rules]
|
||||
blanket-ignore-comment = "error"
|
||||
missing-type-argument = "error"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.13"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = []
|
||||
#
|
||||
# [tool.ty.analysis]
|
||||
# return-type-inference = "always"
|
||||
#
|
||||
# [tool.ty.rules]
|
||||
# truthiness-test-of-none-union = "warn"
|
||||
# blanket-ignore-comment = "warn"
|
||||
|
||||
Reference in new issue
Block a user