Commit Graph

29660 Commits

Author SHA1 Message Date
Petr
7f22ee443e [python] Fix nullability annotations (PyAstNumericLiteralExpression)
GitOrigin-RevId: d5db0add83ac134aab91198b1a931c026829d216
2024-07-28 15:43:22 +00:00
Petr
93b9066edf PY-34617 Support version check
GitOrigin-RevId: 3318ff79cdcc5ba0ce5e4feb65abad5ad0f4acfa
2024-07-28 00:24:15 +00:00
Petr
16a7fb4b3e PY-34617 Move getTopLevelAttributes(), findTopLevelAttribute() from PyAstFile
GitOrigin-RevId: 226a7e968851ab0c8730bb79ca90d0ed5dcec364
2024-07-28 00:24:15 +00:00
Petr
cfa28c0d2a PY-34617 Move getClassAttributes(), getOwnSlots() from PyAstClass
GitOrigin-RevId: 39ee4f79543a35fc696f9c754f5c5cf89b711f63
2024-07-28 00:24:15 +00:00
Petr
5147d37e25 PY-34617 Code deduplication (PythonCommonCompletionTest)
GitOrigin-RevId: 20d48eb4e6d5620c182d388398dd80234b2eefe7
2024-07-28 00:24:15 +00:00
Petr
302dbfa84b PY-34617 Remove obsolete class (PyStatementPartImpl)
GitOrigin-RevId: 48d03f62afa160410ac59e3938dfd876a41f54b7
2024-07-28 00:24:15 +00:00
Petr
4317e0a1ed PY-34617 Restore PyIfPartIf, PyIfPartElif interfaces
GitOrigin-RevId: 3283be157d6f030840103fba5b8c7cfcee508e2b
2024-07-28 00:24:15 +00:00
Egor Eliseev
994775243f PY-71926 Refine test detection criteria
Add a new setting Python Integrated Tools: Detect tests in Jupyter Notebooks.
Exclude Jupyter Notebook files from the scope for test detection by default.
Add tests


Merge-request: IJ-MR-134248
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: 0bee082bde4fa608cb1907b8fbd64b97bb9755a0
2024-07-26 17:24:30 +00:00
Aleksandr Sorotskii
46aa6ba5a3 Cleanup deadcode; Autoformat things. Remove unnecessary ext methods
(cherry picked from commit 51f6ec2346d9c7385ee7ca115c4c6a5369d7b46b)

IJ-MR-141079

GitOrigin-RevId: 28ca8e87f39a64a9bffe069858489884ea3a6bb1
2024-07-26 16:10:08 +00:00
Natalia.Murycheva
6aaaf0a7ce [PyCharm Tables] PY-73176 fixed review remarks #PY-73176 Fixed
GitOrigin-RevId: 328aead2fdf8e90646479f518fec997a991ca906
2024-07-26 12:18:52 +00:00
Natalia.Murycheva
b1e672ff5e [PyCharm Tables] PY-73176 added slicing for new tables
* also removed the regression in debugger (changes in pydevd_xml.py should be removed after fixing PY-73947)

GitOrigin-RevId: 57c91be1c7e43eeb603eaf963a1e11b42e71c441
2024-07-26 12:18:52 +00:00
Egor Eliseev
2a8c477af2 [python] Poetry refactoring
Splitting a huge file `poetry.kt` into several


Merge-request: IJ-MR-139484
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: ea51232c4795538400f3cbbe159850e1c4252ac5
2024-07-26 11:54:03 +00:00
Ilya.Kazakevich
154a516ad3 PyCharm: Support conda in JUnit5 tests.
Mark test with `PyEnvTestWithConda` or use `testFixture`

GitOrigin-RevId: 3171d8a4de18ca29a1c624dcffa53921965eed25
2024-07-26 04:03:03 +00:00
Ilya.Kazakevich
1f92ee9f14 PyCharm: make project optional in conda as targets API doesn't require it more
GitOrigin-RevId: b007fcf1a3a84d25d786de40bb016778bf4d8af9
2024-07-26 04:03:03 +00:00
Vladimir Krivosheev
398ebce1d5 split content report
GitOrigin-RevId: ef449bdf4c5480a6ee3ce43b4af118c2c6e31219
2024-07-25 19:20:06 +00:00
Aleksei Kniazev
7e95d1c688 [python] initial step of python interpreter creation unification (PY-73396)
- refactored NPW to use target-specific model
- creating interpreter through widget reuses the same UI (can be turned off by python.unified.interpreter.configuration)
- interpreter discovery and virtualenv creation using Targets API
- no more PyDetectedSdk in dialog


(cherry picked from commit 581b2d40254d26f02eb3aa61bc2e842854b87a3e)

IJ-MR-140986

GitOrigin-RevId: be29188304882ef5f0fb88bb60c538714a2d8746
2024-07-25 18:01:45 +00:00
Egor Eliseev
ba209d5e44 [python] Change WARN to INFO notification when can't find a resource name in PythonHelpersLocator#findPathInHelpers
Merge-request: IJ-MR-140807
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: 9b570d824218117096d0ad97a01bbaa6ee71e53a
2024-07-25 16:07:35 +00:00
Alexander Lobas
932f2d438e Swap icon path parameters: move expUI path to the first place
GitOrigin-RevId: 74cf09fb454c89b676be259cdd7437a81ac4c067
2024-07-25 15:12:07 +00:00
Vladimir Koshelev
5482951755 [pycharm] adjust promotion for the community version
GitOrigin-RevId: 3ba3b76c52615dfb9a62c4f94e8da7226ce541e9
2024-07-25 11:09:29 +00:00
Vladimir Koshelev
749b8039d5 [whatsnew] update pycharm2024.2.json
GitOrigin-RevId: a6e60eaee38c62e0e3542b69a9b05d5af733e152
2024-07-25 11:09:29 +00:00
Vladimir Koshelev
eb71087383 [pycharm] add productivity action to what's new
GitOrigin-RevId: 718b34e3b9dee8146891358096fc857c1a37d77e
2024-07-25 11:09:29 +00:00
Petr
5470f70382 PY-73886 PyArgumentListInspection causes file parsing
GitOrigin-RevId: 8fa6b52a2ac5d28e7148c3e10445ee61fef6c89b
2024-07-25 01:35:16 +00:00
Ilya.Kazakevich
cc9b394af1 Pycharm: Venv might have UnixPythonSdkFlavor instead of VirtualEnvSdkFlavor on Linux.
`getFlavor(@Nullable String sdkPath)` was used, and it detected the first flavor that is reports `isValidSdkHome`.

Somehow `UnixPythonSdkFlavor` stayed before `VirtualEnvSdkFlavor`.

We now sort them to make platform independent go first (as platform-dependent are always there).

We also use a separate method `tryDetectFlavorByLocalPath` not to use a deprecated one.

GitOrigin-RevId: ee7010e2b4a51d8447bd57264b2ce85af4ea1199
2024-07-24 19:20:28 +00:00
Vladimir Koshelev
c69a1a2810 [pycharm] add smoke tests that shared v1/v2 modules are in sync
GitOrigin-RevId: fe6fc6a60a83240b8b2b0a3c7a0f88ff707f0227
2024-07-24 17:26:27 +00:00
Mikhail Golubev
632fd3187b PY-44858 Remove a constant condition, simplify and inline the areAllFilesInNamespacePackage check
GitOrigin-RevId: 9608d23aa56d13bec8b81786a52768d02a7a94ef
2024-07-24 16:18:40 +00:00
Mikhail Golubev
f392777e01 PY-44858 Create regular packages in refactorings initiated from top-level files in source/content roots
Otherwise, if someone wants to move a definition/extract a superclass from there to
a brand-new package, e.g. from main.py to pkg/mod.py, a namespace "pkg" package will
be created.

Restore the original behavior of PyExtractSuperclassTest.testMultifileNew: the origin
file was inside a regular project root without __init__.py alongside.

GitOrigin-RevId: 750414b18582740076c14bfcfd07fa38992b4428
2024-07-24 16:18:40 +00:00
Mikhail Golubev
1c026ac470 PY-44858 Make multifile scenarios comparing directory content in PyExtractSuperclassTests more uniform
Now they all just compare the resulting test project content with an explicit "after" directory
instead of checking individual files in the test code.

GitOrigin-RevId: cff00d0a6b8ea4547b719997716e95a3f7c62cc9
2024-07-24 16:18:40 +00:00
maxle
90bbc21f3f PY-44858 Move and other refactorings don't introduce __init__.py inside namespace packages
Namely, Move Module Members, Extract Superclass and Make Local Function Top-Level were
all affected by this.
Now we check if the refactoring origin is inside a namespace package to decide whether
__init__.py should be generated for target directories.

Co-authored-by: Kamalia <alishevakamalia@gmail.com>
Co-authored-by: Maksim.Levitskii <maksim.levitskii@jetbrains.com>

GitOrigin-RevId: b0b3420c5ec8d1f7d3000d8834211631690a0c42
2024-07-24 16:18:40 +00:00
Vladimir Koshelev
ec8c3a8aa3 [pycharm] remdev: migrate PyCharm Frontend launcher to v2 modules
GitOrigin-RevId: e2c62c23bd0a22c742a46177c1a1ad4c4b5b95d0
2024-07-24 13:13:53 +00:00
Aleksandr Sorotskii
50423837d1 Remove fleetbackend knowledge from specific python providers. Autoformat files and cleanup imports
GitOrigin-RevId: 26ef94c856234203d36b548759d4b5cb0429a638
2024-07-24 12:44:07 +00:00
Aleksandr Sorotskii
88aac5feca Set SDK configuration to be module-specific rather than project-wide; PY-61957
(cherry picked from commit 0e876dfa218e86effc181e564a5ddd4ff3963a17)

IJ-MR-140759

GitOrigin-RevId: 16a90a28d5766ded2782f8ce33f3c9ab29e4c87d
2024-07-24 12:36:00 +00:00
Ilya.Kazakevich
9d7bc20e6b PyCharm: change WARN to INFO for spammy messages to decrease noise level
GitOrigin-RevId: 6d4ccc81b3ff8b17d75c6ab3d580afaa616d7c48
2024-07-24 05:38:47 +00:00
Natalia.Murycheva
d57dee5d32 [PyCharm Tables] PY-60408 format is not taken into account for numpy arrays #PY-60408 Fixed
Now the format is taken into account.
The previous solution didn't work as expected as "format % variable" doesn't work in case a "variable" is a string, and value_representation has the String type.

GitOrigin-RevId: b35dedfe144f3c496f17ec7a0f5da6685e1bd3db
2024-07-23 22:21:13 +00:00
Ilya.Kazakevich
06d28837eb Pycharm: Only use Py3 Conda in JUnit5 tests.
No need to test against Py2 in 2024, and conda is a different beast and should be tested separatelly, so we use tags to filter "wrong" pythons. See `api.kt`

GitOrigin-RevId: 2f47f5aca3c8cd9d12684e425796aedaee5d239f
2024-07-23 21:34:16 +00:00
Vladimir Krivosheev
5256cd4583 IJPL-158412 refactor ConsoleViewImpl (part 2)
GitOrigin-RevId: 6b1c1a77a9810dd429950d18bf42959b452d3e61
2024-07-23 19:47:53 +00:00
Ilya.Kazakevich
2579567d1c Pycharm: Create fixture for SDK on JUnit5
GitOrigin-RevId: 7bba4bb3070c255d11c117b89021475c5f20103a
2024-07-23 18:57:29 +00:00
Nikita Kudrin
cdf91bf213 [benchmarks] Renaming PerformanceTest* => Benchmark*
GitOrigin-RevId: 9963b84d51e1062acc262a8d3d3de1409a708e3b
2024-07-23 18:20:01 +00:00
lada.gagina
ec501b1899 [python] allow creating conda envs with python 3.12 (PY-64372)
GitOrigin-RevId: 78dff111c6b8138c59d1c310ce36f6757608c017
2024-07-23 16:29:01 +00:00
Max Medvedev
9f930f7d18 @NotNull/Nullable for ASTDelegatePsiElement
GitOrigin-RevId: 48e11f869faf0565db1aeedfb8544fdb04876c61
2024-07-23 13:27:20 +00:00
Aleksandr Sorotskii
f3082fb053 Persist associate path changes. Cleanup association logic a bit; PY-72692
(cherry picked from commit a3ee1feb4f98f0f66760762819800bbc6342bd08)

IJ-MR-140559

GitOrigin-RevId: dbff236b7fbe20b23d6dea7b324a3f1ac031d2d6
2024-07-23 13:25:57 +00:00
ekaterina.itsenko
5a5671d785 [pycharm] PY-48714 PY-70538 PY-73919 Fix error in debug mode
GitOrigin-RevId: 1d4932b22a574c4b9f6fce3df180986e4f9c08ec
2024-07-23 13:20:27 +00:00
Egor.Eliseev
0be08ded36 [python] Rewrite PythonHelpersLocator
1. `PythonHelpersLocator` is an API to get helpers. It is aware of PyCharm Community helpers but also aware of some EP that provides additional helper paths.
2. EP implementations for PyCharm Prof and Jupyter that provide additional (prof) helpers.
It will help avoid problems with which Locator to use from Professional, Community or Jupiter plugins.


Merge-request: IJ-MR-140027
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: c7c34f323247002699866f12f6ff5a08cf6a18ff
2024-07-23 12:04:22 +00:00
Nikita.Ashihmin
3c5b6a8592 PY-74000 PyCharm 2024.2 in-product what's new // Add to whats new
GitOrigin-RevId: bc22a2eef5aa7fd611ed740553ef9a6c3a0a95b7
2024-07-22 23:17:37 +00:00
Natalia.Murycheva
2e297515eb [PyCharm Tables] PY-73557 added a dot for a type safety (avoid collision with users' types)
GitOrigin-RevId: e4215a9b877db8b110c535c998c1c6469d32a30d
2024-07-22 12:39:10 +00:00
Vladimir Koshelev
c559ffab2b [pycharm] change the order of extended completion contributors to last, so they cannot pollute other stages.
GitOrigin-RevId: 675ead60c308a41142cc0abc1015d2aa50178e02
2024-07-22 12:26:17 +00:00
Mikhail Golubev
44aefbe28d PY-73675 Restore non-recursive index access in PyClassNameCompletionContributor
GitOrigin-RevId: 18365f310a0315cd743fb732ffdf65e530528a15
2024-07-22 11:06:30 +00:00
Mikhail Golubev
54f528f334 [python] In completion of importable names, plot CDF of completion time with Sputnik
GitOrigin-RevId: 683631a9969b2e76e2058178aff9c3398ee0dd16
2024-07-22 11:06:30 +00:00
Andrey Vokin
e6c66dfd5e PY-74012 Deprecation decorator stub resolves during indexing
Avoid using resolve when calculating deprecation messages

GitOrigin-RevId: 813849bdaeb3819b445db600fc0efbcb014ed5c9
2024-07-19 19:18:54 +00:00
Vitaly Legchilkin
8d7b0f9039 [python] fix 'Check out the Endpoints tool window' link using ActivateEndpointsToolWindow action (PY-73955)
+ reformat pycharm2024.2.json

GitOrigin-RevId: 11905d658145a003947d276677f7c0ce04c1006f
2024-07-19 16:45:27 +00:00
Aleksandr Sorotskii
e044767d68 Persist sdk associate path change, so it could be seen in other places; PY-70145; PY-72692
(cherry picked from commit 4b74266cd7aa3af2f2475b51ca3a91116704f394)

IJ-MR-140372

GitOrigin-RevId: 75f918b7340cd082f86aad0e3ba2fe28d3f5efb1
2024-07-19 15:39:18 +00:00