Commit Graph

212 Commits

Author SHA1 Message Date
Nikolay Chashnikov
325f45ce66 API cleanup: remove unused deprecated API (IDEA-305637)
GitOrigin-RevId: 9cc6eecfa40189d8d08c2861ffe9ffce84d31e87
2023-01-18 13:27:16 +00:00
Vladimir Krivosheev
98ace0a061 use XXH3 instead of MurMur3 to generate an icon image key
The main reason — use XXH3 everywhere

GitOrigin-RevId: 7b158b9b3689d16f09182abb0b58113c7303f874
2022-12-27 08:01:26 +00:00
Tagir Valeev
a8b394e10c Fix constant value and other warnings
GitOrigin-RevId: 5521a732a94fb9c8ee55e6487e306392d53173bd
2022-12-05 16:50:45 +00:00
KotlinIsland
45dd0bf0e8 Add language level for Python 3.12
GitOrigin-RevId: 10d24da89149754de63c87ec9edc0a1b7f131f17
2022-11-13 01:47:35 +00:00
Alexey Sedunov
c443410d79 Django: Extract Django/Jinja2 commons
GitOrigin-RevId: 3f6bb7b7cd80cbf6007e1930d4d018e1b1cff44a
2022-10-16 11:59:01 +00:00
Irina.Fediaeva
cb8edc622b PY-33341, PY-56416, PY-28900: Render attributes and init params description in the class documentation
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
2022-10-07 14:42:01 +00:00
Tagir Valeev
bddacd6ba6 Enhanced switch used
GitOrigin-RevId: b9a7d5074c4eb10c87bae5c7703b9671eb0f1aff
2022-09-21 10:52:22 +00:00
Nikolay Chashnikov
65b8769078 [python] API: remove 'for removal' flag from deprecated API which aren't going to be removed soon (IDEA-301912)
GitOrigin-RevId: c8d31098d77a0e153a8a67d50253aaa90c5ee98c
2022-09-16 12:41:18 +00:00
Tagir Valeev
9038e3f77b Remove empty and irrelevant javadoc tags
GitOrigin-RevId: dcbbb8cff7ef267525129c464769f761d92c2120
2022-08-09 09:41:49 +00:00
andrey.matveev
04f5b85d4a PY-29898 Impl resolve keyword argument to dataclass attribute
Also fix PY-55231
Add declarationElement field to callable parameter to resolve parameters to class fields in dataclasses

GitOrigin-RevId: ae2703b958061df6f2d74b19920a6e3be2a084f6
2022-08-05 11:19:33 +00:00
andrey.matveev
b7398bb63d PY-10719 Fix add import above import with noinspection comment
GitOrigin-RevId: 6dd79b10e56b9e9e2eee76c83d5974dee43446a1
2022-07-26 13:17:54 +00:00
Mikhail Golubev
5d16f5e090 [ExpUI] Register an iconMapper to override Python file type icon
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
2022-07-05 14:40:31 +00:00
Tatiana Tulupenko
0b504ec770 [ExpUI] Update Python file type icon
GitOrigin-RevId: d6bda965a8819a9c329fefd12a22adf8f8aa8ffd
2022-06-28 18:31:58 +00:00
Tagir Valeev
11595f3956 Fix most of JavaDoc <-> code mismatch warnings
GitOrigin-RevId: 9a87a8b90993b56cd045722734c5c5f466601ae3
2022-06-20 12:02:27 +00:00
andrey.matveev
ecd113fc12 PY-52930 Support except star
(cherry picked from commit 4d03313cce07e4c3ff4748328cf2e04ba74b8d91)

IJ-MR-24242

GitOrigin-RevId: fa6c1b9077ef78b35c8f3453debcf06bcbc96364
2022-05-18 00:19:37 +00:00
Alexey Kudravtsev
2340e499ad replace invalid javadoc tag "@author:"
GitOrigin-RevId: f5835f60a7dc5e3b5c7cf1433350891e61d84b0b
2022-05-10 16:41:06 +00:00
Mikhail Golubev
ea039cfc94 PY-42200 Annotate PyWithItem.getExpression as @NotNull and update usages
Parser was changed so that it no longer produces empty PyWithItem elements
after trailing commas.

GitOrigin-RevId: f730e68644f3444269d65d157b666267755e0d2d
2022-05-04 12:31:42 +00:00
Nikolay Chashnikov
3de1d05eec [API] mark for removal API which was deprecated in 2021.2 or earlier and has few usages only (IDEA-281036)
GitOrigin-RevId: 6f1cdecf02dae3ab19351a4fa4e895f98265ea0a
2022-02-17 22:44:08 +00:00
Nikolay Chashnikov
abc373560d [API] replace ApiStatus.ScheduledForRemoval annotation by 'forRemoval' attribute (IDEA-288466)
Since we don't want to specify planned removal date anymore, there is no need to use a separate annotation.

GitOrigin-RevId: a047c55475e0f4752a2842577e094fb041c6c05b
2022-02-11 15:12:14 +00:00
Tagir Valeev
3df143dfe6 Use try-with-resources; other warnings fixed
GitOrigin-RevId: 57e9bbb62af11b0629f9d02534b07e7a921c55af
2022-02-08 06:35:41 +00:00
Alexey Kudravtsev
306d067698 remove incorrect @Nullable from getIcon() to avoid multiple "returning not null from nullable method" false positives
GitOrigin-RevId: f6db4092c037f563b2b19e909fed325e46af4ebe
2022-01-31 13:45:48 +00:00
Nikolay Chashnikov
46cc1d78e4 [python] cleanup: get rid of unused deprecated API (IDEA-281036)
GitOrigin-RevId: 3ce01c6689410cc147b8b552a1354e7996a6d0f9
2022-01-13 20:14:22 +00:00
Vladimir Krivosheev
0429b0130d use murmur 3 32 instead of xxhash 64 for icon digests - reduce icon db size (mostly in memory, because on disk compressed using LZ4) and avoid loading extra classes on start-up (murmur is already used in classloader)
no collisions so far

GitOrigin-RevId: 1f41a238729772b4b3c4faa5de5cd1ccb9ec3f65
2021-11-19 09:43:32 +00:00
KotlinIsland
119696be41 Add language level for Python 3.11 (PY-51300)
GitOrigin-RevId: bc2fd30744ca9c2a8023c718ade4689bfc9fef9b
2021-11-17 15:31:59 +00:00
Aleksei Kniazev
67caf6fc19 review fixes for endpoints for python (PY-50382)
(cherry picked from commit 76937e4de07193be94e352086ced5554029300e2)

IJ-MR-15304

GitOrigin-RevId: fe3c12aba62e46627ebd4d6a446a1b02a072c87e
2021-10-18 20:56:01 +00:00
Aleksei Kniazev
f8c2ad4f8a arguments literals are now stored in python decorator stub (PY-50382)
this makes accessing decorator arguments possible without needing to parse the file again

(cherry picked from commit a9854dbf181f3c7bf488d6ecc18205bb29df2422)

IJ-MR-15304

GitOrigin-RevId: 1031d888a4a08a706c4fa9e2dc48e2f97462c95e
2021-10-18 20:55:54 +00:00
Semyon Proshev
ae73545b30 Apply API changes planned for 2021.3 (PY-43884)
Only the ones have no usages.

GitOrigin-RevId: 48270979f03b3a7ebbf9c5ed555d098edd66d1ab
2021-10-18 16:33:54 +00:00
Mikhail Golubev
e9d11d1215 PY-48010 Warn about problems causing SyntaxErrors in PEP 634 patterns
GitOrigin-RevId: 718645cc5dfd6d0a14f1bd802f3c5bb2bb2c6074
2021-10-18 13:57:02 +00:00
Mikhail Golubev
4582894569 PY-50943 Fix NPE caused by now null-hostile immutable collections in PyNames
I also went through other places where these collections are used and updated
them where needed.

GitOrigin-RevId: d74bcea57e0ab71273837e3c443b600bfd64ff3b
2021-10-16 09:04:24 +00:00
Mikhail Golubev
1421975c96 PY-48012 Resolve and complete attributes in PEP 634 class patterns
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
2021-10-15 17:36:56 +00:00
Semyon Proshev
7f77fb1c37 Sync with typeshed @ 837b57fdd1a814237ef4b15f6ce19c701303aebb (PY-41510)
Temporarily exclude https://github.com/python/typeshed/pull/4987
Temporarily exclude https://github.com/python/typeshed/pull/5206 from `collections/__init__.pyi`

GitOrigin-RevId: 6146af923d749b0cff56e823101b8f2b8525383d
2021-08-18 15:24:40 +00:00
Mikhail Golubev
1dc1f77281 i18n: Add missing annotations in Python documentation providers
Proper internationalization of PyDocumentationBuilder and
PythonDocumentationProvider is still in the making, though.

GitOrigin-RevId: 57745d8c00a9cff9f0d6de6e599482c88a5b147e
2021-08-17 12:24:16 +00:00
Alexey Kudravtsev
c01b94ba55 remove wrong dependency of OpenAPI module "python.psi.api" on impl modules
GitOrigin-RevId: e660cbbf392d65e6ef67490c94d25808df2414bc
2021-08-10 12:44:38 +00:00
Alexey Kudravtsev
0cf1acca79 suppress inapplicable warning about too long vararg
GitOrigin-RevId: 753d11062ad52fc94d732a4c41a045ef7a1226b6
2021-07-28 15:04:40 +00:00
Semyon Proshev
efac5e9a99 Avoid NPE after 862ce946b10e0e1b5bdfbe7193d5f6cc6f5d516c, java collections don't accept nulls (EA-343543)
GitOrigin-RevId: 0ed980425f5c2cb4513b2f6db0cda1764facaefd
2021-07-27 11:03:06 +00:00
Alexey Kudravtsev
0e1192da1e remove Guava from api modules dependencies
GitOrigin-RevId: 862ce946b10e0e1b5bdfbe7193d5f6cc6f5d516c
2021-07-14 17:56:24 +00:00
Alexey Kudravtsev
3e50d9d2c4 sort semicolon-separated extensions within "extensions" attribute of <fileType> in plugin.xml to ease the maintenance
GitOrigin-RevId: 06b3061fdb7bfed840a7bb58e4725e3351b37b40
2021-06-18 23:41:42 +00:00
Semyon Proshev
03ec7fd6af Remove constant resolve contexts because they were almost always updated with another type evaluation context
GitOrigin-RevId: 7390874410af7264dbee695d0a339d20d3f3b35b
2021-06-13 14:50:13 +00:00
Semyon Proshev
d76048f17e Make all resolve context initializations to be with explicit type evaluation context
GitOrigin-RevId: 1814d37684ef355cb224a6fedad873667cc0970e
2021-06-13 14:50:12 +00:00
Semyon Proshev
7b8b5bb12f Make creating resolve context with explicit type eval context shorter
GitOrigin-RevId: 7dce0f1869ca114d729f8368273291940eda21ef
2021-06-13 14:50:11 +00:00
Mikhail Golubev
cb08d4de98 PY-48760 Implement CFG for PEP-634 match statements
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
2021-06-11 10:16:38 +00:00
Semyon Proshev
12633a37e2 Apply API changes planned for 2021.2 (PY-43884)
GitOrigin-RevId: 6437eea19fa1885199c9988912e7d558be644953
2021-06-03 19:54:50 +00:00
Ilya.Kazakevich
480de17a92 Get rid of PyTestFrameworkService
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
2021-05-28 23:17:29 +00:00
Mikhail Golubev
639b8d1029 PY-48008 Implement parsing of PEP-634 match statements
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
2021-05-24 10:28:29 +00:00
Dmitry Jemerov
749ce8a332 Cleanup: remove @author tags
GitOrigin-RevId: 9174eb8d77215b16f9f6c6074e6aced654d95ef1
2021-05-03 13:07:48 +00:00
Semyon Proshev
78c5130604 Remove special processing of PathLike
Triggered by https://github.com/python/typeshed/pull/5242

GitOrigin-RevId: 3bc2be4bcf1ccc652c7fbee4d730c871c30728c8
2021-04-28 00:06:59 +00:00
Andrey Vlasovskikh
6d8428ee4e PY-46321 Renamed PyDocstring into Doctest to make more sense as a user-visible name in Markdown code fence blocks
GitOrigin-RevId: 1284ab756e522db0c8109b59d6d78b1d1f503a7f
2021-04-27 17:32:03 +00:00
Andrey Vlasovskikh
1c353a809a PY-45206 IJ-CR-3996 More null safety
GitOrigin-RevId: 98a84a10f2b50e76ae416140fecff8d05d42bbe2
2021-03-30 14:27:03 +00:00
Vladimir Krivosheev
809b7ca201 deprecate ServiceManager.getService(project)
GitOrigin-RevId: 3805c3aac4e084c828558bf1b1570339f7f3b4a3
2021-03-26 21:30:32 +00:00
andrey.matveev
3322cedc0d PY-19917 Support type ignore comments
(cherry picked from commit 693b7f2bf037ac9fd464e330390c76ee5268c023)

IJ-MR-5695

GitOrigin-RevId: 354a4ba98e0ff01787ae0718c8643772b118fc9f
2021-02-15 16:45:22 +00:00