Commit Graph

29572 Commits

Author SHA1 Message Date
Natalia.Murycheva
bf711c1d91 [PyCharm Tables] (fus, "python.dataview") fixed review remarks
GitOrigin-RevId: 48da962da524ccd1b1772428851cdf87d316e8d9
2024-07-11 12:02:21 +00:00
ekaterina.itsenko
13be10f91f [PyCharm] PY-72811 Scientific View (fix): Fix bug in GeoDataFrame table view
GitOrigin-RevId: e38102212edbd2add3b4899dda634764d251b3a0
2024-07-10 23:22:25 +00:00
ekaterina.itsenko
0b6b757d0e [PyCharm] PY-65143 Scientific View (fix): Fix tables displaying in old pandas versions
GitOrigin-RevId: 863db71d3ab01c250ca1c0ab59101400c40d3f8a
2024-07-10 22:32:48 +00:00
lada.gagina
7b10e2c98b [python] requirements.txt: fix NPE when installing conda packages (PY-73392)
GitOrigin-RevId: 5deddd72f11fe420e19116e9c6dfb5dbe16b9bed
2024-07-10 21:51:34 +00:00
Vladimir Koshelev
d649ae4e61 [pycharm] add un-reachability support to PyUnboundLocalVariableInspection
GitOrigin-RevId: ea1125977ea8b4de370973d606cc5ba7b258dd82
2024-07-10 14:22:00 +00:00
Vladimir Koshelev
582edda2e8 [pycharm] fix control flow tests after adding CallInstruction
GitOrigin-RevId: 1878a3211a07b216a64df3efa6ac7cb1c94fd246
2024-07-10 14:22:00 +00:00
Vladimir Koshelev
2625d2472b [pycharm] remove NoReturn logic from control flow builder
GitOrigin-RevId: 85ba28fd8b86fe0b6337703798a0b869bb793e88
2024-07-10 14:22:00 +00:00
Vladimir Koshelev
8a4dfe563c [pycharm] add type eval context to PyDefUseUtil
GitOrigin-RevId: a6973f48d9e1f5c473209df25ff507be482e8904
2024-07-10 14:21:59 +00:00
Aleksandr Sorotskii
097939cc6b PY-11963: add package mappings for 5k most downloaded packages pypi
GitOrigin-RevId: 95cf83695ad0031ffb009cd5cca8b68a0b49d6d3
2024-07-10 11:34:52 +00:00
Aleksandr Sorotskii
8a4013db94 trim whitespaces
GitOrigin-RevId: 97014ede7f4df5b9ec07e9d6b64abe6878581df4
2024-07-10 11:34:52 +00:00
Nikita Pavlenko
f87a1466b3 [PyCharm] Jupyter (fix): intellij.jupyter.core module is now pure v2 module, and propely included to everywhere. #PY-73770 Fixed
GitOrigin-RevId: f990cb2ff9e32a38565d4d25975a7c9929880dfa
2024-07-10 10:50:42 +00:00
ekaterina.itsenko
e242aa4556 [pycharm] PY-71967 Minor refactoring + add typing
GitOrigin-RevId: 0da48f8ed53867e8dea3fe15ccac9a993e47ab68
2024-07-09 18:15:56 +00:00
Natalia.Murycheva
6dcf2b2d34 [PyCharm Tables] added more values for data types in the "python.dataview" group
GitOrigin-RevId: 478fb43193ffbd79de129e51237390fbadc39045
2024-07-09 14:39:31 +00:00
Vladimir Koshelev
cb2bd66867 [pycharm] keep all properties nullable
GitOrigin-RevId: c037070af3b0134cbd81648fcbb18d7662a2fd66
2024-07-09 13:03:51 +00:00
Pavel Karateev
567ee4977e PCQA-456 Python 3.13.0b3 is available
(cherry picked from commit f65fb479665d419df4577aa2a3c98ec6186db03a)

IJ-MR-137982

GitOrigin-RevId: 16aa6c0d81d80e06e85648c08002de8c4edb3de5
2024-07-09 12:22:43 +00:00
Pavel Karateev
24ab0a7b06 PCQA-456 Update Python versions for PyCharm helpers tests
* Drop 3.6 & 3.7
* Add 3.9+


(cherry picked from commit 52d830b560f32bb75d1a1d84f67fa2e1b41a1f2e)

IJ-MR-137982

GitOrigin-RevId: dba613bc2f34198c25b85fff3e581ab997764e17
2024-07-09 12:22:43 +00:00
Daniil Kalinin
163ea4bf45 PY-73755 Fix parameter hints for Python don't work in Split Mode
GitOrigin-RevId: 90090969126d7d15345b2052f0a05ec3a0af791c
2024-07-09 11:27:22 +00:00
Dmitriy.Panov
8a5ada0dcf GitHub plugin is split into community and ultimate parts which should be published with the same ID if not bundled
GitOrigin-RevId: 7673da63563b1b8005cc8259440ff2e8cfd32c2b
2024-07-09 10:15:41 +00:00
Aleksandr Sorotskii
292c6e0837 PY-11963 Sort lines
(cherry picked from commit 8c998e6ace23604f29382d4547bdeebb0583e954)

IJ-MR-139247

GitOrigin-RevId: c0d0f76a36073d25506e0446bbb406ea97f73d8f
2024-07-08 19:39:36 +00:00
Aleksandr Sorotskii
aa7a9353cf PY-11963 Add some packages
(cherry picked from commit 7d465f3823c0f9f0a31b49a0b675cbfda4a2f79b)

IJ-MR-139247

GitOrigin-RevId: 27c8ac0e17a2e04d2fd919b777ad98614dbb3bd9
2024-07-08 19:39:35 +00:00
Vladimir Koshelev
b7700aaf66 [pycharm] PY-64403 add vision file to PyCharm
GitOrigin-RevId: 7b3fd4492e0cebb313626c7a1b52e369e0577279
2024-07-08 18:25:33 +00:00
Petr
a6fc2c09c6 PY-53693 PyCharm adds _: KW_ONLY to dataclass' init signature
GitOrigin-RevId: 471e10b4e12a36a640da2f3006719372797b5cf1
2024-07-08 17:53:13 +00:00
Tagir Valeev
d263e30396 Remove raw types in PopupStep#onChosen inheritors
GitOrigin-RevId: df36f1a249ab4d87c2d10e3d39c27f0351298921
2024-07-08 16:18:24 +00:00
Egor.Eliseev
459520a382 PY-66449 PyCharm displays a Poetry env as "invalid" when adding an existing SDK
Add a path to interpreter `bin/python`


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

GitOrigin-RevId: 83da7890a778b3022ac874c1b6feed7d93b691f7
2024-07-08 13:31:34 +00:00
Konstantin Hudyakov
423a4cf421 IFT-573 Fix completion item detection in Python Basic completion lesson
GitOrigin-RevId: 83e1c2575c879fba8732417bd68ca783b52f5c99
2024-07-05 18:36:32 +00:00
Natalia.Murycheva
c4b259368d [PyCharm Tables] PY-73641 ... in tables instead of values #PY-73252 Fixed
* fixed polars case

GitOrigin-RevId: 259d170d79afbddf97a99e62b27685255aaf6d12
2024-07-05 16:32:23 +00:00
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