Previously, methods PythonHelpersLocator.getHelpersRoot and PythonHelpersLocator.getHelpersProRoot were trivial and had no I/O inside. The things changed in bd5183320a43878de861fd11ae1f9bf79710290a, and it became dangerous to call potentially long operations within locks.
The helpers are used by Code Inside inspections, so it's impossible to move all executions of these functions out of read locks. So, the functions now checks the global progress indicator in order to hold read actions as little as possible.
Also, a logging message is added when calling these functions from EDT. It's not a hard assertion: code that used to work keeps working, but errors about threading are reported now.
GitOrigin-RevId: ae39a6ba6e91a01d2410ede859a0accfb312d758
Previously, PyCharm copied the parent of the helpers' directory. It contained python.jar which has size about 60 MiB and which is not used as a helper.
GitOrigin-RevId: d9cec6ddb93a36dc349af511fbb96221cdb5d951
Python helpers take more than 50 MiB, and copying it lazily on every startup can bring unnecessary performance problems on slow machines.
There's a better approach: copying the helpers into idea.system.path once per installation.
GitOrigin-RevId: 33bcf4eb61463d03480c985014d9e503f94638db
Previously, unresolved class attributes were not reported for the decorated classes because of potential dynamical attributes (see PY-7173). This commit enables this warning again because false-negative unresolved reference warning is much more common and distracting than the case with dynamic attributes
Merge-request: IJ-MR-105254
Merged-by: Daniil Kalinin <Daniil.Kalinin@jetbrains.com>
GitOrigin-RevId: 67d1ab3fe1d5a140836d49f8ef6a65cf01873456
The rename of the packages is needed to follow the naming convention. See the attached ticket for the details.
GitOrigin-RevId: 24b2328e572efa23d67133fc495855cf662ea795
Adds a new option which allows to parenthesise call chains, import statements, string literals and binary expressions instead of using backslashes when splitting them to multiline by pressing Enter
Tests for PY-17193, PY-10709
Merge-request: IJ-MR-98747
Merged-by: Daniil Kalinin <Daniil.Kalinin@jetbrains.com>
GitOrigin-RevId: 964f6c997e1e106a3d1b82d24e46947cc83fb2c6
Functions annotated with `NoReturn` and `Never` now taken into account in the Control Flow Graph building process, and the code after calling such functions is treated as unreachable.
Merge-request: IJ-MR-105973
Merged-by: Daniil Kalinin <Daniil.Kalinin@jetbrains.com>
GitOrigin-RevId: ef5840ae6e593498fc334dc9bd2daadccebf2b13
It is needed for `pytest` fixture function is not marked as one that can change the return type.
Now `pytest` fixture function returns `realType` instead of `Any | realType`.
See `PyKnownDecoratorUtil#asKnownDecorators`.
GitOrigin-RevId: c65334f2b15546f46ce5063be4c3952032bdb7c0
This reverts commit 08f87af551374373e8fd6b5e5133d4158c1e31de.
The commit 08f87af55 was de-facto a reversion of bab46cfcb44b86f2b6191b5c369f5170811eb98a.
During a private conversation it turned out that 08f87af55 was created mistakenly and unintentionally.
GitOrigin-RevId: ac8af8a3ee614f6afef2c10ab34bfc76b60edb7c
Add 'PyTestReferenceAsStringProvider' for fixtures from pytest.mark.usefixtures attributes.
Add new field 'myTextRange' to 'BaseReference' class.
It's needed for specify the text range for proper highlighting.
For example, to highlight text in a string without quotes.
GitOrigin-RevId: 5b9094169b71dd57d9091d6907346ca69f631ef3
It turns out that there are parts of code that suppose existence of all helpers without requesting them in advance via API of PythonHelpersLocator. These parts broke down when helpers became copied to a temporary directory.
Merge-request: IJ-MR-107692
Merged-by: Vladimir Lagunov <vladimir.lagunov@jetbrains.com>
GitOrigin-RevId: bab46cfcb44b86f2b6191b5c369f5170811eb98a
Add new intention and a corresponding quick fix for the usage pd.Series.values property from pandas library.
^DS-4878 Fixed
Merge-request: IJ-MR-106089
Merged-by: Natalia Murycheva <natalia.murycheva@jetbrains.com>
GitOrigin-RevId: 0c8dc40b09ee2d95ecd8ded532f31f5ef4a7740f
This is needed for a clearer understanding of the API: there is no ordering of changes in VersionedStorageChange
GitOrigin-RevId: 2a3800e216d81e87e836f8bd19708b5ba74f496a
Added a new Extension Point for corresponding quick fixes for "Statement without effect inspection." Added QF for Jupyter notebook case and Python file with cells. This QF splits cell just right after the statement without effect
^DS-4558 Fixed
Merge-request: IJ-MR-104455
Merged-by: Natalia Murycheva <natalia.murycheva@jetbrains.com>
GitOrigin-RevId: 7773895cf1ebd6d4e8d56b41e335ec8b97ca5d78
Rely on the fact that PsiScopeProcessor processes class attributes
in the order of their definition.
GitOrigin-RevId: 0b39b0c6002c75d2af3b4988d3aa095823b33cb8
Got rid of redundant inner classes and fields, removed repeated logic, used
more obvious control flow constructs.
GitOrigin-RevId: a04977afc8a0ceb213380b406e74e37dfc7cd49c