PY-33341: Now we render the “Attributes” section in the class documentation, it also allows to describe inherited attributes. (Previously we didn’t render it at all)
PY-56416: In the attribute documentation popup we are able to render attribute description from class docstring. (Previously we took documentation only explicitly from attribute one-line docstring)
PY-33341: We render the “Parameters” section in the class documentation for init parameters, described in the class docstring. (Previously user couldn't use class docstring to describe init parameters)
PY-28900: For the init parameter documentation we take the description from the class docstring if init doesn't have its own docstring. (Previously we took parameter description only from init docstring)
GitOrigin-RevId: d67bf49c72cf7a3634805a6e310c943f1ea848d1
Also fix PY-55231
Add declarationElement field to callable parameter to resolve parameters to class fields in dataclasses
GitOrigin-RevId: ae2703b958061df6f2d74b19920a6e3be2a084f6
Previously, the mapping file was put in a wrong place (not at the root of
a "resources" directory) and was not registered in any plugin descriptor.
However, under debug, the right icon was still displayed because pythonFile.svg
is also remapped in all-platform PlatformIconMappings.json. In actual installers
pythonFile.svg and PlatformIconMappings.json end up in different classloaders,
so this fallback doesn't work.
GitOrigin-RevId: ee361cd7d2d0158b0cc96bd652a5cb53bb7d88c5
Parser was changed so that it no longer produces empty PyWithItem elements
after trailing commas.
GitOrigin-RevId: f730e68644f3444269d65d157b666267755e0d2d
Since we don't want to specify planned removal date anymore, there is no need to use a separate annotation.
GitOrigin-RevId: a047c55475e0f4752a2842577e094fb041c6c05b
this makes accessing decorator arguments possible without needing to parse the file again
(cherry picked from commit a9854dbf181f3c7bf488d6ecc18205bb29df2422)
IJ-MR-15304
GitOrigin-RevId: 1031d888a4a08a706c4fa9e2dc48e2f97462c95e
I also went through other places where these collections are used and updated
them where needed.
GitOrigin-RevId: d74bcea57e0ab71273837e3c443b600bfd64ff3b
Both are implemented other the type of the corresponding class.
References resolve to any readable attribute of a class, however
some obviously wrong variants such as special "dunder" attributes
and methods are intentionally excluded from completion suggestions.
GitOrigin-RevId: 5edac14f47cba39840b15b0dd7f21e2e46077261
Proper internationalization of PyDocumentationBuilder and
PythonDocumentationProvider is still in the making, though.
GitOrigin-RevId: 57745d8c00a9cff9f0d6de6e599482c88a5b147e
I introduced a new type of CFG instructions, similar to ConditionalInstruction,
called RefutablePatternInstruction. The idea is that every pattern that can
possibly fail to match is surrounded with a pair of such instructions, helping
to describe how the control flow moves in each case. The PEP calls the opposite
type of patterns that always match "irrefutable", hence the name. We need these
synthetic instructions because otherwise some refutable patterns such as literal
ones (e.g. "42") don't leave any nodes in the graph. Incorporating the information
about irrefutable patterns right into the graph allows catching cases such
as "wildcard/name capture makes remaining patterns unreachable", both in OR
patterns and independent case clauses.
GitOrigin-RevId: beebe1890a6a824b188e6954a2c92f7ec52079e0
All information moved to factories.
It is now possible to check if package is installed using PyPackageService, no need to have separate service.
GitOrigin-RevId: f97d4e09cd93c6b2d46e36920b513b5b82d53dc6
All the corresponding PSI elements now have empty interfaces. The API will be
"beefed up" as we start adding actual processing of them in the code insight
(e.g. for the upcoming CFG and inspections).
The trickiest part of the parsing was the recovery. Patterns allow only
a limited subset of expression syntax, but I tried to sensibly consume and report
everything else (not building PSI for it). So that if user starts typing more
general expressions in the midst of a pattern, we still give meaningful error
messages. It seems a likely cause of errors when the feature first rolls out in
Python 3.10.
GitOrigin-RevId: fae40034964e4a25d91dab06a43d3fc07225d9c7