Update PyInspectionVisitor to init type eval context from context file for injected fragments.
Update TypeEvalContext to check if passed element is inside injected fragment in origin.
** Parametrize
* Skip "unused" inspection for args, provided by decorator
* Check all args are declared (inspection)
* TODO: Support rerun only one parametrized test
** Fixtures
* References from arguments to fixtures
* Type interference
* Disable "unused" inspection for fixture args
minor benefit is avoiding a reference cycle from anonymous class to
TypeEvalContext as anonymous inner classes always hold a reference to
the containing class
except PyCollectionType extending PyClassType that makes a lot of
sense since both PyCollectionTypeImpl and PyTupleType already extend
PyClassTypeImpl, but one still needs explicit casts to
PyCollectionTypeImpl to access the corresponding class definition.
Forward references resolution implemented for annotations according to
PEP 563. Inspections fixed to respect forward references for both
annotations and pyi stubs.
PyiReferenceResolveProvider removed since its functionality is now
implemented by PyForwardReferenceResolveProvider.
For that I introduced a new method -- getElement() in PyType
that allows to find out the element that can be used to reference
this type according to PEP 484 perspective, e.g. a target assignment
for TypeVar's and NamedTuples and PSI class themselves for class types.
Also, class object types for named tuples are wrapped in typing.Type[]
as expected.
Also PyCollectionType now properly implements PyClassType since
both of it inheritors: PyCollectionTypeImpl and PyTupleType already
extend PyClassTypeImpl.
I had to separate PyTypeVisitor into two abstract classes since
(quite confusingly) not all types of our type system are available in
python-psi-api module.
Update resolve for `[]` on definitions so `__class_getitem__` is supported.
Support this method (and `__mro_entries__`) in highlighting and completion.
Process it as a static method.
Update PyDataclassesTypeProvider to ignore such fields or correctly specify default value for them.
Create custom target stubs for such fields to store parameters.
Infer `tuple` class type when `collections.namedtuple` could not be analyzed.
Infer `namedtuple` class type when `typing.NamedTuple` could not be analyzed.
Create callable type for `typing.Callable`.
Update ignoring `__getitem__` for ancestors, docstrings and annotations.
Infer superclass collection type correctly.