* main:
[red-knot] Preliminary `NamedTuple` support (#17738)
[red-knot] Add tests for classes that have incompatible `__new__` and `__init__` methods (#17747)
Update dependency vite to v6.2.7 (#17746)
[red-knot] Update call binding to return all matching overloads (#17618)
[`airflow`] apply Replacement::AutoImport to `AIR312` (#17570)
[`ruff`] Add fix safety section (`RUF028`) (#17722)
[syntax-errors] Detect single starred expression assignment `x = *y` (#17624)
py-fuzzer: fix minimization logic when `--only-new-bugs` is passed (#17739)
Fix example syntax for pydocstyle ignore_var_parameters option (#17740)
[red-knot] Update salsa to prevent panic in custom panic-handler (#17742)
[red-knot] Ban direct instantiation of generic protocols as well as non-generic ones (#17741)
[red-knot] Lookup of `__new__` (#17733)
[red-knot] Check decorator consistency on overloads (#17684)
[`flake8-use-pathlib`] Avoid suggesting `Path.iterdir()` for `os.listdir` with file descriptor (`PTH208`) (#17715)
[red-knot] Check overloads without an implementation (#17681)
Expand Semantic Syntax Coverage (#17725)
[red-knot] Check for invalid overload usages (#17609)
Summary
Adds preliminary support for
NamedTuples, including:NamedTupleobject__new__method, i.e. proper checking of constructor callsNamedTuple=>tuple), mainly to make type inference of named attributes possible, but also to better reflect the runtime MRO.All of this works:
Not included:
MyTuple = NamedTuple("MyTuple", […])syntaxTest Plan
New Markdown tests
Ecosystem analysis
I uploaded the ecosystem full diff (ignoring the 19k
no-matching-overloaddiagnostics) here.missing-argumentfalse positives which come from the fact that named tuples are often created using unpacking as inMyNamedTuple(*fields), which we do not understand yet.unresolved-attributefalse positives, because methods like_replaceare not available.invalid-argument-typediagnostics look like true positivesCo-authored-by: @dcreager