Commit Graph

29512 Commits

Author SHA1 Message Date
Andrey Lisin
7efde8b4be Fix Python 2.7 test environment creation task definition
GitOrigin-RevId: 36ce80c7d63e22777f905c02cd6bae5297f447d4
2024-04-24 11:25:51 +00:00
Mikhail Golubev
fcf665e761 PY-64304 EA-247016 Report illegal usages of "await" expressions even if there is no operand
In other words, in a statement like "await = 42" there are now both a warning about
the missing operand and a warning that an await expression cannot be used as
an assignment target. This behavior is consistent with other expressions where
additional parsing errors are not special-cased.

GitOrigin-RevId: 37a68eacc7ec042435c185f9ddd8bc2eea42b40f
2024-04-24 09:03:57 +00:00
Mikhail Golubev
b9d7fee816 PY-64304 EA-247016 Don't report illegal "await" expressions used as assignment targets during parsing
Instead, parse them as usual and later report in the dedicated AssignTargetAnnotator
and TypeAnnotationTargetAnnotator. This way, a PsiError element appearing in the PSI
tree of a type declaration statement doesn't cause PyAstTypeDeclarationStatement.getTarget
nullability contract violation.

GitOrigin-RevId: a3e90088cfac7938c398d4d293a72dbd127a2cd0
2024-04-24 09:03:53 +00:00
Andrey Vokin
06cf1ece7c PY-71860: make "AI Assistant" toolwindow available when promote aciton invoked
GitOrigin-RevId: 3ed03db935991f8007b83965a9ea82a2677ef897
2024-04-23 20:25:43 +00:00
Andrey Lisin
0f6a0f2964 PY-72148 Fix string representation in debugger variable view
GitOrigin-RevId: 61b98f4a25fee1738ca0950a8f93af55ac44ff3b
2024-04-23 18:47:03 +00:00
Mikhail Golubev
5f6848fccb PY-65966 Disable partial tensorflow stubs in Typeshed with a registry flag
Otherwise, incomplete stubs break our custom logic for resolving tensorflow
modules re-exported from its _api.v2 subpackage, such as tensorflow.audio,
tensorflow.image, tensorflow.random, etc.

We did the same for Numpy stubs in the past, enabling them back once they
became mature enough.

GitOrigin-RevId: b1e46067406a592761f56b7d296a287e5282b079
2024-04-23 11:03:04 +00:00
Dmitry Batrak
881b370b95 RDCT-1092 Hotkeys are displayed incorrectly in popups on different OS
replace SystemInfo.isMac with ClientSystemInfo.isMac() in keyboard-shortcuts-related code

GitOrigin-RevId: 640604dff8e09d1aeccd0edc156873dd63c09fea
2024-04-22 19:16:22 +00:00
Alexey Belkov
5ea9f88846 Migrate deprecated usages of com.intellij.refactoring.suggested.range
GitOrigin-RevId: 2fd44594219500e1c8a84841bcd4326ed7e54083
2024-04-22 12:48:24 +00:00
Andrey Lisin
f1fc631552 Restore Python 2.7 environment for Python debugger env tests
GitOrigin-RevId: 4a0e3d7dfcad262b92f2fcb4209b886e64dc2885
2024-04-22 12:17:01 +00:00
Yuriy Artamonov
f41a7c4dc9 [plugins] IJPL-148474 Use non-blocking read action to collect libraries in DependencyCollector
GitOrigin-RevId: c5b597fada22aa0e5fac524c57d5b6051e27804b
2024-04-19 20:19:19 +00:00
Andrey Vokin
7c54716a66 PY-71860: make possible to disable AI Completion Action promoter
GitOrigin-RevId: 8acdb5947e990e67013c3f4b4ccbdda05c2e03bb
2024-04-19 20:14:17 +00:00
Dima Golovkov
9faf2674f1 Update python icons for IntUI for python-psi-api for UX-3044
GitOrigin-RevId: 7d835ab3505807c81082b5db7ae6363f306d7b1b
2024-04-19 16:48:31 +00:00
Dima Golovkov
240bd4d7b2 Update python icons for IntUI for pythonCore for UX-3044
GitOrigin-RevId: eb66c30f8376ca9c7d80e8c4dc6a2e5439aa0588
2024-04-19 16:48:26 +00:00
Mikhail Golubev
319738dea5 PY-59791 Simplify extracting a wrapped type from sqlalchemy.orm.Mapped
Use PyTypingTypeProvider.getAnnotationValue for that, similarly to already
re-used in other places PyTypingTypeProvider.getReturnTypeAnnotation.

Also, I've better separated handling of attributes explicitly annotated with Mapped
and just initialized with a mapped_column call. It will help to remove special
casing for Mapped once generic descriptors are fully supported in type inference
(PY-26184).

GitOrigin-RevId: eaeb66abd26b851507970b112360631704b41db3
2024-04-18 22:59:27 +00:00
Andrey Vokin
1cc5303a3a PY-71860: AI Actions promotion
GitOrigin-RevId: 52648b965e5663a8420cf63bfa30f12de24a8b10
2024-04-18 22:30:53 +00:00
Andrey Vokin
4b947848b9 PY-71860: add AI Completion Promotion to PyCharm Community dev build
GitOrigin-RevId: 52407e14cf42d5a071e7fc086e2cef0d3a3a9020
2024-04-18 22:30:48 +00:00
Andrey Vokin
6fd89125f9 PY-71860: add AI Completion Promotion to Settings of PyCharm Community
GitOrigin-RevId: e4741fd50d0e24308a9566a07c135dd1feadfbf1
2024-04-18 22:30:37 +00:00
Andrey Vokin
702406397d PY-71860: add AI Completion Promotion to Settings of PyCharm Community
GitOrigin-RevId: dd46a2b57873b0043dfa935ab085d6de326bc01c
2024-04-18 22:30:32 +00:00
Andrey Vokin
d012a532c4 PY-71860: AI Completion Promotion should open "Install AI Assistant" toolwindow
GitOrigin-RevId: e55264d1ed982e94a3594cb7833e87e2e8927152
2024-04-18 22:30:27 +00:00
Andrey Vokin
63f63bb9ba PY-71860: make promotion action presentation customizable
GitOrigin-RevId: 2bd48a5bafc00377555d9711f253d7a844586757
2024-04-18 22:30:22 +00:00
Petr
e01b0b6beb PY-40480 Completion for argument passed to parameter hinted as Literal
GitOrigin-RevId: 462b03dc35eef70bc873b568cae239d40f1d4974
2024-04-18 20:55:14 +00:00
Mikhail Pyltsin
2152c276dc [python] Pattern variable can be used mass cleanup
GitOrigin-RevId: 04229dfd0912fbc846d4b1d5e3726ef6c9c005c6
2024-04-18 14:03:55 +00:00
Piotr Tomiak
3a14f22bc7 WEB-64707 Flaky test com.intellij.tests.BootstrapTests: org.angular2.codeInsight.Angular2HighlightingTest.testTrUnderTemplate
GitOrigin-RevId: a46fed4f6d7e64a89e44cca76bd09c6c117b0abe
2024-04-17 16:21:14 +00:00
Mikhail Golubev
ec49cd6c0c PY-29489 Rename and simplify PyTargetExpressionImpl.getTargetTypeFromTupleAssignment
GitOrigin-RevId: 7913cfdc8a4b9664b56b71ecbfde12c49d701e72
2024-04-17 11:41:27 +00:00
Mikhail Golubev
5bf2f99b65 PY-29489 Support unpacking non-generic iterable types, e.g. str or range
Use getIterationType for that, already implemented for inferring types
of for loop targets.

GitOrigin-RevId: daac45b4118629676eb37897cd08d5f8e193bf76
2024-04-17 11:41:23 +00:00
Mikhail Golubev
b70b23ca27 PY-29489 Support unpacking to targets in square brackets
GitOrigin-RevId: 470b0bd74bf3dc2ed5c8b6902df264624b50628d
2024-04-17 11:41:20 +00:00
Mikhail Golubev
8c0b817248 PY-29489 Infer types for generic iterable unpacking in assignments
GitOrigin-RevId: ac4454eae1eba2ec4c3eb71377253b1f97685561
2024-04-17 11:41:16 +00:00
Tagir Valeev
696dfffffc [java-refactoring] IDEA-92605 Detect conflicts for rename local variable
GitOrigin-RevId: 75ad577ef79dac053c689d9eb6d20dec3af222c7
2024-04-17 09:32:44 +00:00
Ilya.Kazakevich
022a8b0885 PY-71792: WSL broken in Python plugin for Idea.
With a new workspace model, forced by the platform, old SDK paths are now saved in `//wsl` instead of ``\\wsl`` formats.
`CUSTOM_PYTHON_SDK_HOME_PATH_PATTERN` failed to recognize them.

Check is also added to `getVersionString` not to pollute logs with things like "Can't run `//wsl$/usr/bin..`".

GitOrigin-RevId: d9a5c4cb8972eee841219b52bf596468e52e770a
2024-04-16 23:20:17 +00:00
lada.gagina
8139ee9f38 Revert "[python] Handle geopandas.GeoSeries objects when displayed as series (PY-65265)"
This reverts commit 0acf9212138809604c671110df60a869637e6578.

GitOrigin-RevId: a8ba65c8724b631b1d24d7f56afa90ca6c3fdc24
2024-04-16 20:50:11 +00:00
Ilya.Kazakevich
c83f6159fd PY-71792: (WIP): No need to show runtime errors as messages
GitOrigin-RevId: d0fdbb16c33f14dc6aee446a3f42c0cfcd4d0b19
2024-04-16 19:34:06 +00:00
Ilia Zakoulov
9377d67718 PY-64143: resolveQualifiedName might be called during indexing
Use withAlternativeResolveEnabled to prevent causing IndexNotReady exception.
Calling resolveQualifiedName as smartReadAction might be a bad idea
since it will postpone resolving for undefined period of time.

This method calls `foreignResults` which might access index as it does for Ultimate in `PyJavaImportResolver`

GitOrigin-RevId: 3bdbf103c3db4a9d55b5a72c3dfb3d5be9390cc4
2024-04-16 19:09:26 +00:00
Ilia Zakoulov
1e724ceee2 PY-64143: Make getFullAppName suspend
GitOrigin-RevId: 5b498851ce19c6657410c86134f31d8fb8f6d7c3
2024-04-16 19:09:26 +00:00
Daniil Ovchinnikov
d8b24af022 IJPL-850 remove ide part from main aggregator module names
- `intellij.platform.ide.monolith.main` -> `intellij.platform.monolith.main`
- `intellij.platform.ide.frontend.main` -> `intellij.platform.frontend.main`
- `intellij.platform.ide.backend.main` -> `intellij.platform.backend.main` (already existed, merged)

GitOrigin-RevId: 5d0405aae6df833cb15d20066ea78458a5876945
2024-04-16 18:35:52 +00:00
Andrey Lisin
86a791dbae PY-63858 Replace accidental EDT usage with pooled thread
GitOrigin-RevId: 9dab4f9584f271bd14316562d52e2200b62534af
2024-04-16 15:49:37 +00:00
Ilya.Kazakevich
d6122096a5 [pycharm] useless dependency removed
Run `PluginModelTest`

GitOrigin-RevId: 039ff0be59bc8cb9eae7fc5b517914dd27010a59
2024-04-16 04:23:10 +00:00
Ilya.Kazakevich
636c384c85 PyCharm: Get rid of includes in v2 plugins: they do not play well with v2.
Autolayout doesn't obey includes. With plain copy/paste (which is a recommended approach for now) we do not have to list all modules manually in `pluginLayout`.

It is taken from `content`.

We also refactor out PyCharm training, as it depends on plugin that may not exist

GitOrigin-RevId: c225b3565a4b3ea1121a7cdf0b072a63b9448ca4
2024-04-16 04:23:07 +00:00
Aydar Mukhametzyanov
2e5abc046e IJPL-43531 Support light/dark onboarding backgrounds in PyCharm
GitOrigin-RevId: c5dfc4b03e0e763a41f5510f20683a13a6e093cc
2024-04-15 11:43:21 +00:00
Aydar Mukhametzyanov
4c1fc883e6 IJPL-43531 Support light/dark onboarding backgrounds in IDEA
GitOrigin-RevId: 0d78ce5e56673f7e868c8b579d742c1b7a572442
2024-04-15 11:42:49 +00:00
Bogdan Kirilenko
2e369fb4d5 [pycharm] PY-63670 HF cards regex fixes
GitOrigin-RevId: d51e68f7036965fdb87e77f10a02e6c9927fc550
2024-04-14 18:49:10 +00:00
Bogdan Kirilenko
8fdb3032eb [pycharm] PY-63670 HF cards - added temporary patch to cover copy-paste functionality
GitOrigin-RevId: 622468c03430372e4bc6a0b0d4bc5b4feccdf774
2024-04-14 13:16:28 +00:00
Egor.Eliseev
9bf5511829 PY-35986 Allow a user to run doctests with pytest
Fix rerunning failed tests for all Doctest.
Do 'Doctest via pytest' option be available not only if a file/fun/class starts with `test_`.


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

GitOrigin-RevId: c1e1fda5f66d1e213f34a057175d8e8986a46647
2024-04-13 17:27:10 +00:00
Ilya.Kazakevich
99f8d00846 PY-64402: Add checkbox to make notebook creation optional, move data field to the upper panel + refactoring.
There was no API for that, so we added `MainPartUiCustomizer` to give `PythonProjectGenerator` ability to customize UI.
As these fields bound automatically to Kotlin DSL UI, no `PyNewProjectSettings` is required.
We also refactored file creation logic to `generateSciFiles` to make it testable.

Test dependencies bring python CORE plugin along with Python plugin, so we can emulate real PyCharm.
Separate module is used because customization module is src by itself and Idea cant compile tests inside of src folder

GitOrigin-RevId: b93b5d0be0ff3acc34c23e56986b8c1edc79d842
2024-04-12 23:16:33 +00:00
Bogdan Kirilenko
31fccde137 [pycharm] PY-70535 PY-63670 PY-63671 MVP for HF FUS schema 3 - added model choice tracking
GitOrigin-RevId: f5aa369a102289d71ac6d178dedc28ca47cd4278
2024-04-12 18:05:44 +00:00
Ilya.Kazakevich
1d5e8dc7c9 PY-64402: New project wizard Jupyter: Do not show segmented button if only one interpreter type is available.
Segment control from only one element is weird.

GitOrigin-RevId: d79ff8824007912393b27f86802cb9971521f146
2024-04-12 13:46:03 +00:00
Natalia.Murycheva
25b67ce42d PY-71857 REWA on showing DF table in Jupyter notebook, statistics is not displayed
Removed computing a number of unique values in a column for pandas tables.
Changed histogram bar logic: always display 20 bars if a table has >20 rows, removed the previous unique value count condition fully.

GitOrigin-RevId: dcda5f4e753a73ce13d1cef2ef8571b02d8304e1
2024-04-12 12:46:04 +00:00
Vladimir Krivosheev
3e3d72911f Revert "Revert "IJPL-973 add extracted modules to products using x-include (later, we can move more common modules to this list)""
This reverts commit 564d46b0

GitOrigin-RevId: 60faf51041ba5c6fcfab284743f4c8ab4a228c00
2024-04-12 07:35:09 +00:00
Bogdan Kirilenko
2285d45708 [pycharm] PY-63670 hotfix for PSI-related exceptions
GitOrigin-RevId: bac0e6b7e8600948146c2dd657c974b40053f6ba
2024-04-11 20:55:36 +00:00
lada.gagina
6355c749f6 [python] Handle geopandas.GeoSeries objects when displayed as series (PY-65265)
GitOrigin-RevId: 0acf9212138809604c671110df60a869637e6578
2024-04-10 20:22:11 +00:00
Egor.Eliseev
a35f818c99 PY-14631 Ability to use config file in IPython console
Add `PyDevIpythonApp` class to make IPython Console configurable


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

GitOrigin-RevId: 23c9ac5590581dc34c66ec702fe22c0ac9156d89
2024-04-10 17:51:10 +00:00