Commit Graph

27362 Commits

Author SHA1 Message Date
Tagir Valeev
6d23486911 [inspections] Use getOptionsPane()
GitOrigin-RevId: 9c5a7cbbf569d13ff16ae3597df14d369cb86be9
2022-12-11 13:00:35 +00:00
Bas Leijdekkers
0559aa643f implement isAcceptableInContext() for Python live template macro so that it is not available in other contexts
GitOrigin-RevId: daba7819e9ff621142e07df43bf2047415f0af8e
2022-12-10 14:52:09 +00:00
Alexey Belkov
80f9c9f8d0 Fix simple "Constant conditions" warnings in Kotlin
GitOrigin-RevId: 0996f9afd1586efc7fd6cc25ee207e26be126a20
2022-12-09 15:29:45 +00:00
Tagir Valeev
5951e2a151 Fix constant values and other warnings
GitOrigin-RevId: a465f651f31462942780f5238a7c3bd1925ec4be
2022-12-08 10:10:07 +00:00
Vladimir Krivosheev
71fed7b32d status bar - custom layout for correct order of widgets (part 1)
GitOrigin-RevId: 69c7f439fdf7fb2e7d23d40564663e2255c0189b
2022-12-08 09:23:23 +00:00
Vladimir Krivosheev
74711913e6 cleanup - default implementation of canBeEnabledOn and isAvailable
GitOrigin-RevId: 68987906e594ad909bc44a1dc192a19eaf95ce22
2022-12-08 09:23:20 +00:00
Vladimir Krivosheev
d10a32ce3f deprecate myProject - use getter instead
GitOrigin-RevId: 1e6dfa7d696ef49d142b3bc7bf2a71ba12fae59b
2022-12-08 09:23:17 +00:00
Vladimir Krivosheev
a82b9e40a7 avoid using project coroutine scope - pass explicitly
GitOrigin-RevId: dbb211051cd031ed6396bc32821b69e0b3920a0e
2022-12-08 09:23:10 +00:00
Mikhail Golubev
5e868d4eba PY-54336 In case of unresolved return type annotation assume that method returns Any
_T_co in itertools.product declaration in Typeshed used to be imported from
_typeshed/__init__.pyi stub and was not resolved as a name starting with
an underscore. Nonetheless, its method __next__ was still recognized as generic
because _T_co used in typing.Iterable.__next__ was used instead thanks to
PyAncestorsTypeProvider. In other words, we inferred a TypeVar as a return
type of a method of a non-generic class. It led to retaining this TypeVar as-is
(not replaced) after substitution and SOE further down the road.

Ideally, the same should be done for other places where type hints can be used,
e.g. if a local variable has an explicit annotation, even an unresolved one,
no other type sources should be examined. Unfortunately, it's not as
straightforward for variables and parameters since their annotations sometimes
don't contain a type, e.g. x: Literal = 5, or x: Final = 5. It means
that we need to distinguish somehow between the cases "incorrect annotation, use Any"
and "this annotation requires further inference for the assigned value", and
our API doesn't allow to express that at the moment.

GitOrigin-RevId: 1bba57bb38718bcab7778049a91d5cbffb5e87c2
2022-12-07 19:04:56 +00:00
Mikhail Golubev
36ff257cd4 PY-54336 Properly protect against recursive substitutions in generic types
The original problem was seemingly fixed by the recent sync of Typeshed
(see 1b80465a7c72f89f48b22d35b69e4da4ea1efd46) where the declaration of _T_co
used in itertools.product.__next__ was moved from from _typeshed/__init__.pyi
to itertools directly.

The SOE was caused by the fact that due to unresolved _T_co in itertools.pyi
we retained _T_co type var in the result of product("bar", "baz") call. Then,
as a value of type list[_T_co] was passed as an argument to
list.__init__(self, __iterable: Iterable[_T]), we formed a mapping
{_T -> _T_co}, but the definition of list[_T] inheriting from Collection[_T_co]
itself added a mapping {_T_co -> _T}, hence we got a cycle.

The right way to handle such cases is introducing scope owners to TypeVars,
as it's being done in PY-53896, so that we can distinguish between _T_co's
coming from different class declarations, i.e. Collection:_T_co and product:_T_co.
Having a recursion check as a safety net is still beneficial, though.

GitOrigin-RevId: 7bebbe14931d44b12bc778f449f854d328169450
2022-12-07 19:04:53 +00:00
Alexey Kudravtsev
39315cf556 remove redundant unmodifiableLIst warnings since Container.map is/will return umodifiable list already
GitOrigin-RevId: ce44abf3ca5c7ee8eb5ac960ca0e7dc94fb71562
2022-12-07 17:44:11 +00:00
Alexey Belkov
390ba59bc2 Fix spelling of "quick-fix" phrase in messages
It should be hyphenated: https://www.jetbrains.com/help/idea/resolving-problems.html

GitOrigin-RevId: a3cc01babc32c3edfbe59594fa3756a415cc169b
2022-12-07 15:26:37 +00:00
Lamberto Basti
2370fcc684 Total rework of the business logic of the PKGS plugin
GitOrigin-RevId: e4cace15934addc48f5a76f293f11e0b2a0d92b0
2022-12-07 15:18:33 +00:00
Egor Eliseev
ebb9057fe6 PY-57296 Remove forgotten statement
(cherry picked from commit 61c50cd4b5aa7bc071b35e0ba7ffdbfe15b21ce2)

IJ-CR-98826

GitOrigin-RevId: c702cf500d869f7e9e8f97a786a71e388af0347b
2022-12-07 14:24:31 +00:00
Egor Eliseev
b80a510400 PY-57296 Add try/except blocks
(cherry picked from commit 8df4252dd34f57f9fd74acf53456a6188ea8d934)

IJ-CR-98826

GitOrigin-RevId: a1360a1ca0f9df35cf217cc55cce548b7d617e61
2022-12-07 14:24:28 +00:00
Egor Eliseev
db1b211bad PY-57296 Create event loop if it didn't exist
(cherry picked from commit 27e0fb0a9ed805f10ee5fcdb51145e8e145f17d0)

IJ-CR-98826

GitOrigin-RevId: 4fd288f2dae6ef61e62192da1ca40ad29cc2ae18
2022-12-07 14:24:24 +00:00
Vitaliy.Bibaev
4447018670 [full-line] Run evaluation plugin with PyCharm community/pro locally
GitOrigin-RevId: 3605de6080ffebda74b88f6483b42877401909f3
2022-12-06 20:51:44 +00:00
Guo Ci
36c7e7b9c1 PY-56361 FutureWarning: pandas.Series.iteritems() in pydevd_utils.py
close #2208

(cherry picked from commit dd5a13edd4f6e460904989212a6575d1f988bdf4)

IJ-MR-99641

GitOrigin-RevId: 1c9cc47f215fc1f783b664ee2c83084488f7533b
2022-12-06 19:31:20 +00:00
Olga.Lavrichenko
6d5df953ef DS-3887 Unite contributors corresponding to DataFrame columns name completion
GitOrigin-RevId: f97f7d3f3352f959810994b3cf1a0bce8cf59f5a
2022-12-06 17:08:57 +00:00
Elizaveta Shashkova
ad5c77d39c PY-57706 Indentation is incorrect when "Emulate terminal in output console" is used
Signed-off-by: Elizaveta Shashkova <elizaveta.shashkova@jetbrains.com>
(cherry picked from commit 21693ce14dd9f789676892394434125935a53852)

IJ-MR-99644

GitOrigin-RevId: 889c3a723252f7375164eb9f0f2c06dc3391a7a2
2022-12-06 15:56:37 +00:00
Vitaliy.Bibaev
304a5ef78b [full-line] Bundle Full Line plugin to PyCharm (PY-56474)
(cherry picked from commit c10d42d84084682eb0d88a8043944509a2f61b2a)

IJ-MR-96048

GitOrigin-RevId: d395d43497aeb4e0ddb5201ddbcdc7af2dee4d40
2022-12-06 14:37:15 +00:00
Aleksei Kniazev
0323fd0008 [python] pass proxy argument for package installation operation only (PY-57612)
(cherry picked from commit ab4d40464934034cfe310297e42b483218dbb3fc)

IJ-MR-99616

GitOrigin-RevId: 38f671ac5c26cda386e3a63c7ef0ee1231f91572
2022-12-06 12:09:50 +00:00
Aleksei Kniazev
cefd5a7e63 [python] review fixes for python packages cache (PY-57156)
(cherry picked from commit 663557e92ebb8f298d6e84cc4090061c3d46e6c3)

IJ-MR-99615

GitOrigin-RevId: aba7345b0472cde75583c7f06ee802b772558946
2022-12-06 11:41:56 +00:00
Aleksei Kniazev
ff4db3c6a2 [python] fixed python packages cache file uncontrollable growing (PY-57156)
- minimizes calls to service in comparator
- cache fields are marked as volatile
- convert TreeSet to List before persisting with gson

(cherry picked from commit 7962bcbd91c4d619f9922668551cf9fd88c292a8)

IJ-MR-99615

GitOrigin-RevId: 85f91d6347e30de5014042904623b50058ede266
2022-12-06 11:41:54 +00:00
Tagir Valeev
a8b394e10c Fix constant value and other warnings
GitOrigin-RevId: 5521a732a94fb9c8ee55e6487e306392d53173bd
2022-12-05 16:50:45 +00:00
Egor Eliseev
d94bf5af90 PY-57055 Add catching exceptions while searching Debugger speedups
IJ-CR-98286

GitOrigin-RevId: a3bfd74cd1105b40ea9221850ce9f552f1bb522e
2022-12-05 10:58:49 +00:00
Mikhail Glukhikh
e0549efc25 Migration to 1.8: fix errors around definitely not-null types (Any bounds etc.)
See KT-36770 in particular.

Note: beginning from Kotlin 1.6, we control nullability of type parameter-based
types more strictly. For example, it's not allowed to pass something of type 'T'
when '@NotNull T' or 'T : Any' is required. It's correct both for K1 & K2.

(cherry picked from commit a2f95c85d2673ff4688cd38aeacb5030df6000a8)

IJ-MR-99516

GitOrigin-RevId: d91601956a53489f29bc72b32e4810122ede0b1c
2022-12-03 14:16:15 +00:00
Alexander Koshevoy
07041636bd [i18n] Add @Nls annotation to PyProjectTomlWatcher.content property
GitOrigin-RevId: 03ed2b9a01b828974edb89ad73917576b66321a4
2022-12-02 12:55:53 +00:00
Alexander Koshevoy
ec929801ca [i18n] Move message from PythonSdkUpdater to PyBundle.properties
GitOrigin-RevId: 91e9c394845bfa2722837623133a0efac3a4656d
2022-12-02 12:55:51 +00:00
Alexander Koshevoy
21d80258a3 [i18n] Move PyAddNewPoetryPanel messages to PyBundle.properties
GitOrigin-RevId: eda1c28ae58b11051f4c8d168f613bf2a00f93cf
2022-12-01 16:00:48 +00:00
Alexander Koshevoy
2e688a5bbf Annotate exception messages with @NlsSafe to get rid of i18n warnings
GitOrigin-RevId: 121e058c529f848b0943330f36fe6ed3652e8693
2022-12-01 16:00:44 +00:00
Vladimir Lagunov
c0d5e73846 PY-57644 Escape characters in PowerShell Conda activator
GitOrigin-RevId: b45b6888327b7aa630106351b3ed673760fb41b7
2022-12-01 14:07:21 +00:00
Alexander Koshevoy
b05eb6bca6 Replace usage of deprecated method with suggested one
GitOrigin-RevId: f232f01275b59721ea65e423ba36358fbacb3646
2022-12-01 13:47:57 +00:00
Alexander Koshevoy
026e3015b9 Correct invalid reference to extension method used in KDoc to remove warning
GitOrigin-RevId: bb6f899c00ac4223956fe599f0d8e105e8f05baf
2022-12-01 13:47:54 +00:00
Alexander Koshevoy
b9684df6b8 Mark return value of path() method @NlsSafe
GitOrigin-RevId: 33376ca1fadcc43710208db3cf95ae7afe530693
2022-12-01 13:47:51 +00:00
Elizaveta Shashkova
442a28eba5 PY-50070 Remove outdated jars from sources
Signed-off-by: Elizaveta Shashkova <elizaveta.shashkova@jetbrains.com>
(cherry picked from commit 8a26f14d2e4cddd1ffd326077a3537e2131419fd)

IJ-MR-99372

GitOrigin-RevId: ac4846c7883e9ec4764599881f7b686c1a542941
2022-11-30 14:01:02 +00:00
Andrei.Kuznetsov
cdea2c52ca Restore backward compatibility of FilePropertyPusher: getFileDataKey should return Key
Otherwise, existing plugins will not be binary compatible with the new platform.

GitOrigin-RevId: 7e9ca0b981b37ba3e85115d7c4b96a983ba9b480
2022-11-29 21:18:51 +00:00
Semyon Proshev
473c8243e5 Remove code that does nothing after f630c748
GitOrigin-RevId: f76333cf82a27f1df07b7cc637fe99ea123980bc
2022-11-28 20:38:06 +00:00
lada.gagina
3982fb30fe PY-57583 Update bundled virtualenv zipapp
20.13.0 -> left unchanged for python2
20.13.0 -> 20.16.7 for all else

GitOrigin-RevId: 9fb642976cd274386ad5d978f818227b86ca3cd8
2022-11-28 20:09:48 +00:00
Alexey Kudravtsev
b2996cda44 deprecate ContainerUtil.newArrayList(Object) to prefer more immutable List.of()
GitOrigin-RevId: 7aadc5db58512750fbf47563df2d77f9be4c6e83
2022-11-28 19:58:14 +00:00
Alexander Koshevoy
bf7b965efa PY-57460 Do not highlight legacy remote interpreters as invalid
GitOrigin-RevId: b0784517cd68fef975fbd9d69ef0303fb0acd0ad
2022-11-25 21:38:40 +00:00
Alexander Koshevoy
95c8b06dfc PY-57558 Take into account interpreter path stored in additional data for running Python processes
Using `Sdk.getHomePath()` as the path to interpreter is not reliable for every case. For example, for legacy remote interpreters `Sdk.getHomePath()` contains prefix, which is used to distinguish different types of remote credentials (for example `sftp://` or `docker://`). It also contains the representation of the value of the remote credentials used. In this case the interpreter path is available via `PythonSdkAdditionalData.getInterpreterPath()`.

These changes fix the problem introduced in c63b57aac9b5a267b3a6710902670bfe7d10c722.

GitOrigin-RevId: a7dc2579d1b0b367353fbecf4b9fe4a56b098e9b
2022-11-25 21:38:35 +00:00
Gregory.Shrago
60dfc9d563 TestActionEvent cleanup 2
GitOrigin-RevId: 617de5980bcee07a7ad4c213039cc5684dac666e
2022-11-25 04:38:25 +00:00
Daniil Ovchinnikov
9bbb7c809f add missing @JvmDefaultWithCompatibility annotations
GitOrigin-RevId: 37a2d4e38688a52597cc2e24c96c953738c4e0cf
2022-11-24 21:23:30 +00:00
Elena Shaverdova
21c45f9e88 Revert "Revert "PY-53631 PyCharm 2021.3 indexing files/folders/symlinks in excluded folder""
This reverts commit a6547911f146ecd016a3e6e671ea3a698ce58b2f.

GitOrigin-RevId: 23fff5b8836dec24141492cc6720e0571ff81e52
2022-11-24 21:06:57 +00:00
Ilya.Kazakevich
1272b67aa4 PY-55369: Fix console encoding
Console should always be UTF-8 regardless any settings. The reasons are:
* This is how it worked before
* Not all one-byte encodings could be used on Python side

We set charset in 3 places:
* CommandLine/PythonExecution
* Env variable
* Console view.

GitOrigin-RevId: 595424d765979330bc0b6303c7267c8e0bff4887
2022-11-24 20:30:26 +00:00
Tagir Valeev
430b6790da Warnings fixed
GitOrigin-RevId: 223091ab18c0fc1d86a40e375b61711c5bd6c204
2022-11-24 13:08:43 +00:00
Elena Shaverdova
6ba1481632 Revert "PY-53631 PyCharm 2021.3 indexing files/folders/symlinks in excluded folder"
This reverts commit 855d4b91a01e10930d7ea07a39f0a0763fbab25c.

GitOrigin-RevId: a6547911f146ecd016a3e6e671ea3a698ce58b2f
2022-11-23 22:28:22 +00:00
Andrey Vokin
913178fbe8 DS-4120 Python console uses wrong python interpreter
Use ordered extensions

GitOrigin-RevId: dfd6c7202ea7c016a4196fd4d4e76edcc293a1ad
2022-11-23 18:28:07 +00:00
Ilya.Kazakevich
622c1fb52b PY-57228: Fix test.
We can't call ``getOrCreateAdditionalData`` from inspection since nothing could be changed from analysis.

GitOrigin-RevId: b133797dc765c4548461f3faf4b7d2358fa9e130
2022-11-23 15:59:53 +00:00