Update PyDocStringTypeProvider to correctly handle `:type args: T1` and `:type kwargs: T2`, and wrap their types to `Tuple[T1, ...]` and `Dict[str, T2]`.
by inserting a new function in the containing host file, not inside the
fragment itself.
Also I fixed issues with keeping hard references to PSI elements and
usage of deprecated TemplateBuilder's API.
I changed behavior of PyClassImpl#NameFinder processor, so that it
always tries to find an element with the first of the names passed to
its constructor. In particular, #findInitOrNew() returns __init__
unless there was only __new__ defined in the class. Otherwise its
behavior contradicts with the method's javadoc.
Some of them might have been left if the corresponding symbols were used
and imported via "from" imports in the same module or new imports of them
were combined with some exiting "from" imports in a dependent module.
Add skeletons for raw_input() in Python 2 and input() for both Pythons.
Update PyUserSkeletonsTypeProvider to wrap callable's return type even if it's null.
Update 'constants.py' so 'float.fromhex' stub is generated with 'staticmethod' decorator, has correct modifier and PyCallByClassInspection doesn't show any warning
In case of definition resolve attribute in metaclass definition and instance.
In case of instance check if metaclass is PyClass and look for attribute in instance attributes.
Same with completion.
Previously they were enumerated in the opposite order, i.e.
descendant fields had lower indexes than their parents. Existing tests
didn't caught that problem because I misinterpreted the method
UsefulTestCase#assertSameElements(), should have used
UsefulTestCase#assertOrderedEquals() instead.
As a fallback value PySubstitutionChunkReference resolves into the
right operand of "%" operator whenever it cannot find individual
expressions for multiple positional formatted fields or a field with
a key. I explicitly check and suppress the intention for such cases.
In future it's better to introduce some sort of "strict resolve"
semantic in the PySubstitutionChunkReference so as do these checks
twice.
Namely, allow lookup items that contain quotes in some cases if the
containing string literal is multiline, hence there is still a suitable
type of quotes to wrap injected string literal into.
The orignal error described in the issue has been fixed earlier as
part of other changes for PY-21161.
PyCharm used to fail to statically evaluate __all__.append() calls in
typing.py and concluded that since __all__ was too dynamic to analyse
it was better to assume that __all__ isn't present.
It affected resolving to internal module attributes not mentioned in
__all__ and even led to false positives in unused locals when these
internal names were imported from another module right next to
star-import from the module with __all__.