[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:
David Peter authored and GitHub committed 2026-10-16 12:41:30 +00:00
1 parent 8d8252cb34
commit c64734bcea
26 files changed
+78

No files matched your search

+3
View File
@@ -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"
+3
View File
@@ -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"
+3
View File
@@ -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"
+3
View File
@@ -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"
+3
View File
@@ -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
View File
@@ -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"
+3
View File
@@ -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"
+3
View File
@@ -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
View File
@@ -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"
+3
View File
@@ -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"
+3
View File
@@ -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"
+3
View File
@@ -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"
+3
View File
@@ -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
View File
@@ -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"
+3
View File
@@ -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
View File
@@ -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"
+3
View File
@@ -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"
+3
View File
@@ -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
View File
@@ -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"
+3
View File
@@ -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"
+3
View File
@@ -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"