[ty] Detect illegal multiple inheritance with NamedTuple by AlexWaygood · Pull Request #19943 · 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-08-18 12:00:59.100097702 +0000 +++ new-output.txt 2025-08-18 12:01:01.560109174 +0000 @@ -672,6 +672,7 @@ namedtuples_define_class.py:95:1: error[type-assertion-failure] Argument does not have asserted type int | float namedtuples_define_class.py:96:1: error[type-assertion-failure] Argument does not have asserted type int | float namedtuples_define_class.py:98:19: error[invalid-argument-type] Argument is incorrect: Expected str, found float +namedtuples_define_class.py:105:24: error[invalid-named-tuple] NamedTuple class Unit cannot use multiple inheritance except with Generic[] namedtuples_type_compat.py:22:1: error[invalid-assignment] Object of type Point is not assignable to tuple[int, int] namedtuples_type_compat.py:23:1: error[invalid-assignment] Object of type Point is not assignable to tuple[int, str, str] namedtuples_usage.py:34:7: error[index-out-of-bounds] Index 3 is out of bounds for tuple Point with length 3 @@ -860,5 +861,5 @@ typeddicts_operations.py:60:1: error[type-assertion-failure] Argument does not have asserted type str | None typeddicts_type_consistency.py:101:1: error[invalid-assignment] Object of type Unknown | None is not assignable to str 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 861 diagnostics +Found 862 diagnostics WARN A fatal error occurred while checking some files. Not all project files were analyzed. See the diagnostics list above for details.