You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/typing-faq.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,6 +175,33 @@ Not yet. A stricter inference mode is tracked in
175
175
[`flake8-annotations` rules](https://docs.astral.sh/ruff/rules/#flake8-annotations-ann) to enforce
176
176
more explicit type annotations in your code.
177
177
178
+
## Why doesn't ty warn about missing type annotations?
179
+
180
+
ty does not report an error for unannotated function parameters, return types, or variables. When
181
+
ty encounters an unannotated symbol, it infers the type as [`Unknown`](#what-is-the-unknown-type-and-when-does-it-appear)
182
+
while still providing useful diagnostics where possible.
-[`ANN001`](https://docs.astral.sh/ruff/rules/missing-type-function-argument/): Missing type
193
+
annotation for function argument
194
+
-[`ANN002`](https://docs.astral.sh/ruff/rules/missing-type-args/): Missing type annotation for
195
+
`*args`
196
+
-[`ANN003`](https://docs.astral.sh/ruff/rules/missing-type-kwargs/): Missing type annotation for
-[`RUF045`](https://docs.astral.sh/ruff/rules/implicit-class-var-in-dataclass/): Implicit class
203
+
variable in dataclass
204
+
178
205
## Why can't ty resolve my imports?
179
206
180
207
Import resolution issues are often caused by a missing or incorrect environment configuration. When
0 commit comments