Conversation
Diagnostic diff on typing conformance testsChanges were detected when running ty on typing conformance tests--- old-output.txt 2025-12-08 22:08:55.843892827 +0000
+++ new-output.txt 2025-12-08 22:08:59.562927816 +0000
@@ -285,9 +285,6 @@
dataclasses_kwonly.py:23:11: error[too-many-positional-arguments] Too many positional arguments: expected 1, got 2
dataclasses_kwonly.py:38:11: error[too-many-positional-arguments] Too many positional arguments: expected 1, got 2
dataclasses_kwonly.py:53:11: error[too-many-positional-arguments] Too many positional arguments: expected 1, got 2
-dataclasses_kwonly.py:61:1: error[missing-argument] No argument provided for required parameter `c`
-dataclasses_kwonly.py:61:9: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `float`
-dataclasses_kwonly.py:61:14: error[parameter-already-assigned] Multiple values provided for parameter `b`
dataclasses_match_args.py:42:1: error[unresolved-attribute] Class `DC4` has no attribute `__match_args__`
dataclasses_match_args.py:49:1: error[type-assertion-failure] Type `tuple[()]` does not match asserted type `Unknown | tuple[()]`
dataclasses_order.py:50:4: error[unsupported-operator] Operator `<` is not supported between objects of type `DC1` and `DC2`
@@ -1030,4 +1027,4 @@
typeddicts_usage.py:28:17: error[missing-typed-dict-key] Missing required key 'name' in TypedDict `Movie` constructor
typeddicts_usage.py:28:18: error[invalid-key] Unknown key "title" for TypedDict `Movie`: Unknown key "title"
typeddicts_usage.py:40:24: error[invalid-type-form] The special form `typing.TypedDict` is not allowed in type expressions
-Found 1032 diagnostics
+Found 1029 diagnostics
|
|
|
I believe the conformance tests are right. |
kw_only from parent classkw_only from parent class
yup! |
|
I'll let @sharkdp review this one, as our |
|
I find the fix here pretty awkward (given that |
|
I think you're right that this fix is awkward; took a look at why and I think it's mostly existing awkwardness / lack of support. I pushed a few TODO comments and one code change, since it was easier than describing in a review. I think we never properly added support for Otherwise this fix looks fine to me. The Maybe ideally we'd also make |
|
I am merging this based on Carl's review. I have opened astral-sh/ty#1835 to track the follow up tasks here (thank you for describing them in detail — I very much agree!). |
Summary
Closes astral-sh/ty#1769.