Files
openide/python/python-psi-impl/resources
Andrey Vokin f35e64fe86 PY-89043 Support PEP 747 Annotating Type Forms
Backport of the avokin/pep-747 branch (9 commits, affb3562397f1..095a39f9091b0)
squashed into a single commit: `TypeForm[T]` annotations, the callable
`TypeForm(x)` form, string forward references and `None` as type-form values,
type-form matching in PyTypeChecker and the inference CSP solver, rendering, and
the argument-count checks.

Adapted to 262, which predates two master-only refactorings:

* the constraint solver still names the variance enum `Variance`, so
  `reduceTypeFormType` takes `Variance` instead of `PyVariance`;
* with the `python.type.any` engine enabled the callee type of a `_SpecialForm`
  call is unknown here rather than `_SpecialForm`, which would make
  `prepareCalleeTypeForCall` never fire and leave `TypeForm(x)` untyped.
  The hook therefore also accepts an unknown callee type, guarded by a cheap
  `referencedName` check so that calls with an unknown callee do not pay for
  qualified-name resolution.

GitOrigin-RevId: 52cef81cef211dd5ec59579581550f2b7ee07760
2026-07-31 19:38:54 +00:00
..