Files
openide/python/testData/types
Mikhail Golubev b1fd219835 PY-59548 Recognize generic class inheritance through aliases in stubbed files
Namely, evaluate expressions in the list of base classes as regular
type hints in PyTypingTypeProvider. It allowed us to properly consider type
aliases, as previously used PyResolveUtil.resolveQualifiedNameInScope reached
only up to the first type alias not following assignment chains further to
class definitions.
It simultaneously made collecting type substitutions for generic classes simpler
since we don't need to replicate the logic of parsing subscription expressions
in type hints specifically for base class expressions and can instead
retrieve type arguments corresponding to expressions in brackets directly from
PyCollectionType.getElementTypes.

Since we process both subscription expressions and plain qualified names in
the list of base classes uniformly now, evaluating them all as type hints,
PyClassElementType.getSubscriptedSuperClassesStubLike also became obsolete.

GitOrigin-RevId: 8a2a45c1be0259ee62f82595289842f043ae02b2
2023-03-17 21:42:37 +00:00
..