[ty] Respect dataclass_transform parameters for metaclass-based models by sharkdp · Pull Request #20780 · astral-sh/ruff (original) (raw)

Diagnostic diff on typing conformance tests

Changes were detected when running ty on typing conformance tests

--- old-output.txt 2025-10-09 13:21:29.281810829 +0000 +++ new-output.txt 2025-10-09 13:21:32.604839205 +0000 @@ -292,8 +292,12 @@ dataclasses_transform_func.py:77:36: error[invalid-return-type] Function always implicitly returns None, which is not assignable to return type T@create_model_frozen dataclasses_transform_func.py:97:1: error[invalid-assignment] Property id defined in Customer3 is read-only dataclasses_transform_meta.py:60:36: error[unknown-argument] Argument other_name does not match any known parameter +dataclasses_transform_meta.py:66:18: error[too-many-positional-arguments] Too many positional arguments: expected 0, got 2 dataclasses_transform_meta.py:73:6: error[unsupported-operator] Operator < is not supported for types Customer1 and Customer1 dataclasses_transform_meta.py:79:6: error[unsupported-operator] Operator < is not supported for types Customer2 and Customer2 +dataclasses_transform_meta.py:83:8: error[missing-argument] No argument provided for required parameter id +dataclasses_transform_meta.py:83:18: error[too-many-positional-arguments] Too many positional arguments: expected 0, got 2 +dataclasses_transform_meta.py:103:1: error[invalid-assignment] Property id defined in Customer3 is read-only dataclasses_usage.py:50:6: error[missing-argument] No argument provided for required parameter unit_price dataclasses_usage.py:51:28: error[invalid-argument-type] Argument is incorrect: Expected int | float, found Literal["price"] dataclasses_usage.py:52:36: error[too-many-positional-arguments] Too many positional arguments: expected 3, got 4 @@ -896,5 +900,5 @@ 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] Invalid key access on 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. Did you mean to use a concrete TypedDict or collections.abc.Mapping[str, object] instead? -Found 897 diagnostics +Found 901 diagnostics WARN A fatal error occurred while checking some files. Not all project files were analyzed. See the diagnostics list above for details.