Commit Graph

29546 Commits

Author SHA1 Message Date
Daniil Kalinin
06d8a78b34 PY-33425 fix pep8 warnings were still shown after suppressing with # noinspection PyPep8
GitOrigin-RevId: 738ab906f4026f8f64a3b1f7185ba8a5add9fe40
2024-07-05 13:26:02 +00:00
Dmitry Kichinsky
f84c2574c5 [maven] IDEA-355917 set explicit nullability in com.intellij.execution.actions.ConfigurationContext.getModule
GitOrigin-RevId: 36411bae7f1ee6f84f6b7494df46076498b16947
2024-07-04 21:50:51 +00:00
Tagir Valeev
6bb83bc8e5 [stubs] Reduce amount of raw types
GitOrigin-RevId: 169895a6ee3c98db193443dbb0ced98497221430
2024-07-04 21:05:23 +00:00
Pavel Karateev
7309a62c8c PCQA-466 Specify pydevd test envs in tox.ini
We can avoid specifying versions here, but ...

1. It won't be possible to run tests locally without checking what
   versions are supported (going to TeamCity config)
2. It won't be possible to specify dependencies for each Python
   version separately when it is required (not yet, but will be soon)

Hardcoding Python versions in two places for `pydevd` tests looks
ugly, but at the moment I have no better ideas. Will investigate as
a separate task in PCQA-447


(cherry picked from commit cc9e50cd7a742b8265497cdc56a49a6be0db38a8)

IJ-MR-138586

GitOrigin-RevId: 717d434d6fd72a6cb6ac0a361917ad22e8e62687
2024-07-03 17:30:19 +00:00
Tagir Valeev
15fb25d32e [python] Fix redundant formatted call
GitOrigin-RevId: b972c2605e3aee85b91bd9f7bd88ade24c417b43
2024-07-03 12:47:15 +00:00
Natalia.Murycheva
f721a69556 PY-73641 ... in tables instead of values
* added setter option for max_rows

GitOrigin-RevId: 3cedda6ac4e9aa4dfcb0bda80111198bf8341e0a
2024-07-02 22:14:44 +00:00
Natalia.Murycheva
873b88a98f PY-72210 minor changes
* removed unnecessary get_value_counts for statistics, as it's redundant
    * removed the corresponding test
* fixed computing VISUALIZATION_DATA for tables in DataView, now visualizations are shown
* minor cleanup: got rid of unused variables

GitOrigin-RevId: 1772fd5cad8ba5777795460fca484e90d0ccef82
2024-07-02 22:14:40 +00:00
ekaterina.itsenko
16c75007f3 [pycharm] PY-71967 Remove unused imports
GitOrigin-RevId: 4c5e1094d1b86eb6b473daed599e37cab5f8dba3
2024-07-02 19:14:38 +00:00
Vladimir Koshelev
2ca8342b13 [python] restore pep8 information level after plugin split PY-73129
GitOrigin-RevId: 53fb0cf4c7efe139694d34f1707cdb8305881e03
2024-07-02 18:12:23 +00:00
Irina Fediaeva
3851796622 Install DRF in Django testing env
GitOrigin-RevId: fdafa913b286425c40f23fbccf71d46b0e5aac31
2024-07-02 16:13:18 +00:00
Mikhail Golubev
eb63148798 PY-73246 Don't insert square brackets after classes not having free type parameters
Even if they transitively extend typing.Generic, such as the builtin str.

GitOrigin-RevId: 9389ef5846e21ba5e0fed8b835beb2d458e42f13
2024-07-02 14:08:48 +00:00
Mikhail Golubev
ebba681c85 PY-62208 Don't suggest names shorter than five characters unless it's an extended completion
Otherwise, we end up with dozens of unintentionally public names such as "s", "i", "k"
even in the standard library (e.g. `this.s` or `pickletools.i`).

Ideally, we should rely on .pyi stubs and the content of `__all__` to offer only explicitly
exposed API, but not every module has any of those two, and it's not clear how to match
.py files and the corresponding .pyi stubs fast enough for completion.

GitOrigin-RevId: 163c472654e60ae63ff893142b8ddb9accc56393
2024-07-02 14:08:48 +00:00
Mikhail Golubev
1a3e6c2a64 PY-73246 Automatically insert square brackets on completion of parameterized types
GitOrigin-RevId: 5e81bc984fa3c7b4f83c564c85d872c5a49cf391
2024-07-02 14:08:48 +00:00
Mikhail Golubev
52850e21d8 PY-62208 Include importable names in basic completion results
Previously, such names were visible only on so-called "extended" completion,
activated when the hotkey for the basic completion was hit twice. The main reason
was that collecting such variants from indexes was a slow process, and we
didn't want to harm the responsiveness of completion for basic names.
Now it becomes possible thanks to a number of performance optimizations:

* Instead of using three separate indexes for classes, functions and variables,
we use one -- PyExportedModuleAttributeIndex. By definition, it includes only top-level
"importable" names, so we additionally save time by not filtering out irrelevant
entries. Also, it doesn't contain private definitions starting with an underscore.
It might bother some users, but given that the previous completion was used
extremely rarely, and the new one is going to be visible everywhere, it seems
that pruning unlikely entries as much as possible is a fare tradeoff. In the future,
we might enable them back on the "extended" completion if there is a demand.
Also, this index binds its keys to the project (`traceKeyHashToVirtualFileMapping`),
further eliminating useless index lookups.

* Thanks to the recent fixes in the platform (IJPL-265), it's now possible to
simultaneously iterate over all keys in an index and request values for a given key
without deadlocks, which is much faster than eagerly fetching all keys first.

* While scanning through all matching entries from indexes, we terminate
the lookup if the number of items exceeds the size of the lookup list.
We can further reduce this number by adjusting the "ide.completion.variant.limit"
registry value.

* Calculating expensive "canonical" import paths (e.g. "pkg.private.Name" is importable as
"pkg.Name") is offloaded to a background thread thanks to the `withExpensiveRenderer` API.
We still calculate these paths synchronously, though, for names whose raw qualified names
contain components starting with an underscore to decide whether these private names are
publicly re-exported and, hence, should be displayed.

The rest of the work has been put into reducing the number of entries on the list, e.g.

* The prefix under caret is now matched from the beginning of a name, e.g. `Bar<caret>`
matches `BarBaz`, but not `FooBar`.
* We don't suggest imported names clashing with those already available in scope.
* Some kinds of definitions are not suggested in specific contexts, e.g.
functions and variables are not suggested inside patterns and type hints.
* Nothing is suggested at the top-level of a class body, where dangling
reference expressions or calls are not normally expected.

Additionally, we don't suggest names from .pyi stubs at the moment, because
it pollutes the suggestion list with entries coming from the stubs for
third-party packages in Typeshed. We should probably enable them back once
we are able to properly disable Typeshed entries for not installed packages.

Some legacy forms of completion are left in the extended mode. In particular,
qualified names of classes are offered inside string literals only in this mode.
Also, module and package names are suggested only in the extended mode, because
top-level packages and modules are already suggested for the basic completion
by PyModuleNameCompletionContributor.

A few tests in PyClassNameCompletionTest were updated or removed entirely because
* we no longer suggest private names
* we no longer suggest names from private modules not re-exported in a public module
* we no longer suggest names clashing with those already available in scope
* prefix matching policy was changed to start at the beginning of an identifier

The whole feature can be disabled with the option "Suggest importable classes,
functions and variables in basic completion" in settings.

GitOrigin-RevId: 0787d42ce337b73b01a60f0bb7aa434fee43e659
2024-07-02 14:08:48 +00:00
Petr
5054f4a9b5 [python] Do not store unused decorator arguments in stubs
GitOrigin-RevId: d1a5f63dbed11a4f373d1d7936700af3bc74f70f
2024-07-02 14:04:36 +00:00
Egor.Eliseev
58d8eddeb8 PY-73525 Split HelpersLocator into Community/Pro versions
Merge-request: IJ-MR-138058
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: cd82bc44337e7fdd182262c44ea5ca29e1804ad2
2024-07-02 11:43:46 +00:00
Daniil Kalinin
3186ddfc5b PY-58497 Cleanup, fix failing tests for Java parameter infos.
GitOrigin-RevId: d9950dfea02d95e6673f20eb940b65dbf85e7861
2024-07-02 09:57:32 +00:00
Daniil Kalinin
ab346dc761 PY-58497 add test on expand/collapse behaviour of Parameter Info window in Python
GitOrigin-RevId: e94b034d97fec61966e76dd6c2d6aef2b1eec393
2024-07-02 09:57:32 +00:00
Daniil Kalinin
29c93a526c PY-58497 Adapt PyParameterInfoTest and PythonConsoleTest to the new Parameter Info implementation
GitOrigin-RevId: 24cdf19e88d98e93cd8c0814b4d040ec88405623
2024-07-02 09:57:32 +00:00
Daniil Kalinin
35aa2b43b4 PY-58497 Add a custom bottom component for Python Parameter Info window.
Make it possible to expand/collapse overloads by clicking the action link in the bottom component or calling Parameter Info window on the same place for the second time.

GitOrigin-RevId: a65de4124b4530dd9cc5f16b0a709e3a6489071c
2024-07-02 09:57:32 +00:00
Daniil Kalinin
d47bd34358 PY-58497 Refactor parameter info logic for Python
Show type hints only for the highlighted parameter

GitOrigin-RevId: f55d8ecc27dcbca5e6c24c5ca347ea3995e69ca8
2024-07-02 09:57:32 +00:00
Ilya Muradyan
7e4a275cbe KTNB-235, PY-64586: Move core notebook support to the dedicated plugin to make it possible to install from different IDEs
GitOrigin-RevId: 1ffd4c09b575a83c37b83514fb7789e1d9863280
2024-07-01 19:29:25 +00:00
Mikhail Golubev
ded1e5d860 [python] Implement acceptPyVisitor in PyStatementListImpl and PyAstStatementList
In PyStatementListImpl, it was seemingly accidentally removed as part of
892acbe0c95fde6aec74b7595b0a58f902c426f5.

GitOrigin-RevId: 17b8db2ee2c779cb32cee346f59fb3cc56911288
2024-07-01 16:43:01 +00:00
Vladimir Koshelev
9bdf1de9e2 [python] move code vision elements to the right side by default
GitOrigin-RevId: 53c4dab7ad7e3569000675961ec8d45a6733bc1c
2024-07-01 09:41:26 +00:00
Nikita.Ashihmin
c06684c79f PY-62528 Tables(fix): Shift-Esc key combination doesn't hide SciView
GitOrigin-RevId: 250b87eeed1d66c51518b261ce864f4f2e9d4435
2024-06-29 15:31:08 +00:00
Nikita.Ashihmin
5f12e9384a PY-73598 Packaging(fix): Exception on open in statistic
GitOrigin-RevId: 1e31df9ab527e1dedab9ed6784aa86695e0570c9
2024-06-29 15:31:02 +00:00
Aleksei Kniazev
f43d8d2af2 [python] fixed python sdk rename (PY-71412)
- wrap sdk modification in write action
- recreate modificator on each consequent save

GitOrigin-RevId: 5b5719e6c29151ff72ddba16718bb6d96b2bcc0e
2024-06-28 19:43:16 +00:00
bogdan.kirilenko
25a5b83cae [pycharm] PY-73471 "python.hugging.face.cards" FUS hotfix - replaced activeFileType -> dialogWindowResult in "cache.management.item.delete.clicked" event
GitOrigin-RevId: fbd0103038118a8fb32fc214322573e5225cf5e0
2024-06-28 18:31:54 +00:00
ekaterina.itsenko
997640f4ac [pycharm] PY-71967 Fix sorting and indices
GitOrigin-RevId: 37769066f814b5406684ba7d0d4276309aa28dd4
2024-06-28 17:37:07 +00:00
ekaterina.itsenko
a490bab8c2 [pycharm] PY-70312 Fix everything except charts
GitOrigin-RevId: dc4ef94d776105260e0b4d0965a08bfaf1165268
2024-06-28 15:04:17 +00:00
Andrey Lisin
a7c8aaa04c PY-73427 Check if shape attribute is safe to access before evaluating it
GitOrigin-RevId: cf74c2c49235f60811ed9419a96dabe081f74b70
2024-06-28 14:58:59 +00:00
Andrey Lisin
5c4c5ad909 Revert "PY-73427 Experiment: always load self variable in safe manner"
This reverts commit dcdf3d070f71e3ad47055fc7620d4d53e5fc3c4f.

GitOrigin-RevId: 3f33fd05916cc4bed1c5f9ed9a2a30e608d94f76
2024-06-28 14:58:56 +00:00
Andrey Lisin
209c9d230e IJ-CR-138109 Acquire lock for entire get_instance() call
This modification streamlines the code as the lock needs to be obtained during the `update_handlers()` call regardless.

GitOrigin-RevId: c5d1d7ce9d3f5c3b81b63b8e6c4a26a72db3e666
2024-06-28 10:51:40 +00:00
Nikita.Ashihmin
7d6b08211f PY-71958 Plots(fix): Interactive mode in Python Plots show plot of fixed size, ignores figsize
GitOrigin-RevId: 48c072bcbfb6825dce0c0a8ecce5c046a88419d9
2024-06-28 09:06:32 +00:00
Andrey Lisin
fb6b4f42d4 PY-73549 Make initialization of variable handlers thread-safe
GitOrigin-RevId: eb4e0b566015efe92ed91604f20f38b64e74143b
2024-06-27 12:21:44 +00:00
Aleksandr Sorotskii
6e8d712dea PY-73259 use uniform package names for stats
GitOrigin-RevId: e133e0c0c38857316a627c742328cd7590232f17
2024-06-26 18:58:58 +00:00
Aleksandr Sorotskii
56cc278737 PY-73001: improve toml stats, add one more test
GitOrigin-RevId: 177c87c825c8b0da937c23c5b0a9c299ab0fdda5
2024-06-26 18:58:58 +00:00
Egor.Eliseev
2317f2b12d PY-73492 Fix errors with "helpers-pro" dir path
Change the "helpers-pro" path from `python-ce/helpers-pro` to `python/helpers-pro`


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

GitOrigin-RevId: 097aebb0e82024bcee84d7527a39813285e94414
2024-06-26 15:21:35 +00:00
Nikita Pavlenko
2aff652d0a [pycharm] PY-64570 DataView(feat): Updated icon for table heatmap controls. All settings are now persistent.
GitOrigin-RevId: f909ebfd70a0dccc793b0c764702b10ff45db4ab
2024-06-26 13:01:50 +00:00
Daniil Ovchinnikov
07f7cdaf55 IJPL-1044 wrap clinit instance requests in non-cancellable section
GitOrigin-RevId: f63849ca504a01dbae51faac27f29e69f43bff86
2024-06-25 20:12:17 +00:00
Aleksandr Sorotskii
b71858d628 PY-73001 Log popular tools and build system requirements mentioned in pyproject.toml
GitOrigin-RevId: 8a54afcc73246ff4d2667229345aa1778dc6a2af
2024-06-25 19:53:37 +00:00
Andrey Lisin
01c2920b53 PY-73427 Experiment: always load self variable in safe manner
GitOrigin-RevId: dcdf3d070f71e3ad47055fc7620d4d53e5fc3c4f
2024-06-25 18:21:10 +00:00
Vladimir Koshelev
1483eeb02a [python] move backspaceModeOverride to PythonSyntax.xml
GitOrigin-RevId: a092d5cc86a59c7a7d3f121b43c29971460ae12c
2024-06-25 16:47:25 +00:00
Nikita.Ashihmin
b05ef09755 PY-73206 SciView(fix): Plotly express plots are rendered in a separate browser tab
GitOrigin-RevId: ec490a33dc24b8cf8e2e1906001aff612ccf3364
2024-06-25 16:08:58 +00:00
Roman Shevchenko
83babac37a [project] moving Python-specific class to a Python-specific module
GitOrigin-RevId: bfa55f07d386018801008a2e490dee10e5ab866d
2024-06-25 14:22:34 +00:00
Vladimir Koshelev
2c8d9f7ca1 [python] fix jumps on backspace when lines start with a lot of indents
GitOrigin-RevId: 3ee4005dc0b85f007d4b895367af7efcdf5fbaab
2024-06-25 12:24:22 +00:00
Dmitrii Panov
57cdc3e628 product version minor updated to 3 for PyCharm
GitOrigin-RevId: 6e8ead164e711cea8bc448d3a69388bdd5c7149a
2024-06-25 07:06:53 +00:00
Bogdan.Kirilenko
d458fb9e65 [pycharm] PY-70369 HF cache management MVP - turned ON + minor fixes
GitOrigin-RevId: 6427d4cd7726fc54086ff6ef0f83572c334594f0
2024-06-24 22:59:41 +00:00
ekaterina.itsenko
2fc8ea1630 [pycharm] PY-71967 Add impl (except sorting in outputs -- to fix)
GitOrigin-RevId: ac079eefe71d7b32daa5e95eaef9c986ab842294
2024-06-24 20:29:15 +00:00
Bogdan.Kirilenko
cf9d541e0d [pycharm] PY-73471 HF storage manager FUS
GitOrigin-RevId: c0430fb63b2ed50fe995019aefb59e8b21d23d85
2024-06-24 15:13:30 +00:00