Commit Graph
460759 Commits
Author SHA1 Message Date
Aleksandr.Govenko 31dd92576e PY-20611 Missing warning about functions implicitly returning None when return type is not Optional
Updated PyFunction to account for implicit 'return None' statements when inferring return statement types.

It affected return type inference of PyFunction.

Fixed a failing test related to formatted strings.

Added a quick fix to make all return statements explicit.

Updated the CFG to include PyPassStatements, enabling detection of exit points in empty functions.

Simplified PyMakeFunctionReturnTypeQuickFix to independently infer function types and handle required imports. Currently, it does not support specifying custom suggested types.



Merge-request: IJ-MR-148719
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com>

GitOrigin-RevId: 9f58961f9eb70e4f9dbba7359f5aafdfd392b7e2
2024-11-26 17:02:37 +00:00
Alexey Kudravtsev f2982c675f annotate @Unmodifiable collections to which unmodifiable data from ContainerUtil is assigned, to make it easier for data-flow inspection to spot mutability-related errors
GitOrigin-RevId: 4372383f31177cbc00d981a81adddc88325e98b3
2024-11-26 16:58:17 +00:00
Alexey Kudravtsev b93277939c highlighting: consider a case when several equivalent injected files could be accumulated in data
GitOrigin-RevId: 1bc26be2d33d721c49c48e126c92789f555fd86d
2024-11-26 16:58:17 +00:00
Alexey Kudravtsev 499e8b72cf warn about immutable lists passed to setItems()
GitOrigin-RevId: a70b45cb5674ce15543f96be8d55c56bdd469208
2024-11-26 16:58:17 +00:00
Ilia.Shulgin f1d078e660 [vcs/llm] Remove redundant lines from diff sent to LLM
GitOrigin-RevId: 898df71f801b8f11a22b3123b6e21486b426839c
2024-11-26 16:55:57 +00:00
Mikhail Pyltsin 7404f51dfc [java-inspections] IDEA-286507 Warn when colon-style expression switch uses yield or throw in every branch
GitOrigin-RevId: 2e79504ab44609427f51fe5652cb995ec72d17d6
2024-11-26 16:55:45 +00:00
Mikhail Pyltsin 74da8644f3 [java-inspections] IDEA-277236 Java 17 support: Conversion from if to switch - misplaced end of line comments and including unrelated return statement in switch.
GitOrigin-RevId: 3bb220692bc9d731f945be76996c314c9ee353f3
2024-11-26 16:55:45 +00:00
Mikhail Pyltsin f299c8ecd4 [java-completion] IDEA-359174 command completion
- decrease scope for common actions

GitOrigin-RevId: 0a71c392d7e80fa8540770264aa8f37e0be90bef
2024-11-26 16:55:45 +00:00
Vladimir Dolzhenko 7ef0c3fe5c [kotlin] Update the link to the K2 mode description
#KTIJ-31579 Fixed

GitOrigin-RevId: 5e1c0b9142c2b80e68b43ae0a86b83d58a808a9f
2024-11-26 16:46:52 +00:00
Ivan Semenov 8f5049601b [collab] allow selecting multiple changes in code review
#IJPL-172164 Fixed

GitOrigin-RevId: 482089c478db5eeb9922564cd4ba695a7c40dccb
2024-11-26 16:38:12 +00:00
Yuriy Artamonov e9ba38fdc1 [registry] IJPL-172399 ConcurrentModificationException when the config has several objects with the same key
GitOrigin-RevId: 8c81e7c83aef4d71314706953df809136572b94d
2024-11-26 16:35:45 +00:00
vladislav.shishov 6c006955d9 [remote-driver] add FloatingCodeToolbarUiTest#testToolbarNavigation
GitOrigin-RevId: bb6cc8b49cbc97b5d0988a26b6cc036479056cd3
2024-11-26 16:31:53 +00:00
Vladislav.Yaroshchuk 9509c9b22d [build-scripts] Do not write plugins.xml if the plugins list is empty
This fixes an exception
```
'non_bundled_plugins' build step failed:
java.nio.file.NoSuchFileException:
/mnt/agent/work/89e70edcf4afcfd6/out/idea-ue/artifacts/IU-plugins/auto-uploading/plugins.xml
```
thrown from `generatePluginRepositoryMetaFile`

GitOrigin-RevId: ec76222f5d024dafb9b41b6040be71fd43055681
2024-11-26 16:15:14 +00:00
Andrey Belyaev 55e3683e99 [github] IJPL-172142 GitHub Actions: JSON schema error. Bundled schemas to the plugin.
GitOrigin-RevId: fc17a96d26bd74d4981eb526af5234de01e3f928
2024-11-26 16:13:46 +00:00
Anton Kozub a2218d2acf IDEA-360017 PIEAE at Structure view opening for the modified Spring class
GitOrigin-RevId: 7358f1d3d5a4593859c9435a413e265a930935fb
2024-11-26 16:12:51 +00:00
Anton Kozub 766469d14c IDEA-361937 Spring Structure: Autowires: better treat the ambiguous candidates (test)
GitOrigin-RevId: d2dbbf61ceedcbe8d8c35f6e897b30c57fe105c7
2024-11-26 16:12:51 +00:00
Piotr Tomiak 66f9324c08 WEB-52274 ImageReaderSpi register file is ignored in the runtime. Use ApplicationLoadListener to register service providers
GitOrigin-RevId: d6ba8400117c2a392e2d864116c5fc33dafb3a44
2024-11-26 15:46:32 +00:00
Maxim.Kolmakov 87c3c5cc16 AT-1729 ExpandMenuCommand throws exceptions
GitOrigin-RevId: 22782f985c0d9287fa2ceee2c5c00e8bf5765897
2024-11-26 15:19:30 +00:00
Maxim.Kolmakov 72c0839880 MP-7120 Limit the number of images on the plugin description page
Don't load more than 10 images per plugin. Some plugins have 50+ images which take 1Gb in heap and might cause OOM.

GitOrigin-RevId: 57e98c83028171f9bc53a86847de7d146ec3e059
2024-11-26 15:19:30 +00:00
Sergey Pak 8aeea054e2 drop mentioning of jsch (related to IJPL-156591)
GitOrigin-RevId: a31b8dfacf56b7f122d8a95c045fc5d88d42e11f
2024-11-26 15:06:47 +00:00
Roman Vasiliev ece8b881ed [evaluation-plugin] Make PreservedApi description clearer
GitOrigin-RevId: 182fb18872f230a9bed88dd82618e41395c973e3
2024-11-26 14:47:29 +00:00
Tagir Valeev 00af22705e [java-intentions] IDEA-363866 Remove redundant type annotations on 'Change variable type' fix
GitOrigin-RevId: 07cb03e013552ae9226b00072ca3f7218509d4ba
2024-11-26 14:32:10 +00:00
Tagir Valeev 452b597000 [platform] ExternalSystemUtil: remove redundant cast
GitOrigin-RevId: 815a9f01f9b832edf8c34bfe81d0ade2703a5f39
2024-11-26 13:58:16 +00:00
Mikhail Pyltsin a9d935a482 [java-completion] IDEA-363369 Postfix completion for conversion
- fix highlighting
- simplification

GitOrigin-RevId: a6b33fdfc8af724993831fd750b548c061861ffe
2024-11-26 13:42:51 +00:00
Ilia.Shulgin d0c4ea7fca [git] Put Advanced commit checks order checkbox below checks
GitOrigin-RevId: b59beeb50e4f021f5f2ef7f52acf4d3ba354b2c9
2024-11-26 13:33:30 +00:00
Mikhail Golubev 642ecbbbc1 PY-77583 Properly detect an interpreter version of a uv-based venv
PythonSdkFlavor#getName is expected to return the prefix of Sdk#getVersionString result,
which is normally an output of `/path/to/python -V` or a similar command
(see the implementation of PythonSdkFlavor.getLanguageLevelFromVersionString).
Since uv primarily manages CPython-based venvs, its getName() for them should
be "Python", not "Uv". PythonSdkFlavors for Pipenv, Poetry, and venv achieve that
by extending CPythonSdkFlavor.

Because an incorrect prefix was returned, we defaulted to LanguageLevel.getLatest()
that was then set for project files by PythonLanguageLevelPusher despite the right
version string recorded in SDK data.

However, one can also install pypy interpreters with uv. We should think of a way to
properly recognize their versions as well.

GitOrigin-RevId: c7331653c34fc5814d2de08318cd44462a96eace
2024-11-26 13:02:58 +00:00
Aleksey Dobrynin e348bfef3c [java, compilation-charts] shade-filtered modules IDEA-363131
GitOrigin-RevId: a88ad26148d10a31a86dea23e7e1d85b0624180d
2024-11-26 12:13:33 +00:00
Semyon Proshev 872f71bebd [Grazie] Update grazie-platform dependencies to 0.3.150
GitOrigin-RevId: fe1cb4bc6b8f44597781ba277c2cf7a049d0c882
2024-11-26 11:56:21 +00:00
Roman Efremov b690ef2dc1 [kotlin] Remove TransformingIterator util
^KTIJ-32260 Fixed

GitOrigin-RevId: 19348a77fe24b7692cad057026d73b90cc5b9763
2024-11-26 11:42:26 +00:00
Roman Efremov 816bcb1c45 [kotlin] Drop unused parameter from unwrap to simply rewrite
^KTIJ-32260

GitOrigin-RevId: af1f4623c5390ee2e70a22d5ca762b809b5dbc7e
2024-11-26 11:42:26 +00:00
Roman Efremov 8b15cc6700 [kotlin] Remove custom seq in favor of stdlib sequence
I found a bug in TransformingIterator: hasNext isn't side-effect-free,
and because of that calling hasNext() twice skips two elements.

But then, I found that in comment in review IJ-MR-107533,
where the custom seq was implemented, it was said that
this seq is a temporary solution.

So, let's remove it then.

^KTIJ-32260

GitOrigin-RevId: 0679789333698ec3a994ab05bd9f62fb75c2bc49
2024-11-26 11:42:26 +00:00
Nikita Pavlenko 4653aff32e [PyCharm] DataView (fix): Fixed wrong dataView panel size in Dialog window. #PY-70685 Fixed
Also added saving of dialog window size and position.

GitOrigin-RevId: 9a1f6f70f98f8acec0813d585dae656901f2c7e3
2024-11-26 11:40:22 +00:00
Vera Petrenkova 1a011c6040 IJPL-165257 revert the solution to the showing elevation dialog after project opening (no creating a project query)
GitOrigin-RevId: 067cd19876431eb7f4725e3b331661401321f208
2024-11-26 11:28:33 +00:00
Vera Petrenkova 1399406244 Revert "IJPL-165257 Show windows defender notification after project opening"
This reverts commit a0d2bb2f8fa84a377b324ee6e1095445866dff57.

GitOrigin-RevId: a08f6730f0828250ccf388b74a66eb6705874296
2024-11-26 11:28:33 +00:00
Vera Petrenkova fe20eb4070 Revert "IJPL-165257 [windows defender notification] refactor code"
This reverts commit 2717ef1c4328720794bc1d8daa4032b26301f97f.

GitOrigin-RevId: 9a2253c64d0c6f91db21c82f28a1f03be8375d94
2024-11-26 11:28:32 +00:00
Vera Petrenkova 7b043eb215 Revert "[platform] refactoring Defender notifications (IJ-CR-148744)"
This reverts commit 23024af4354c8870d5547c2d40cd9b8e3698a348.

GitOrigin-RevId: 98364669edcb0d32eab66be68eac71866ba250b5
2024-11-26 11:28:32 +00:00
Nikolay Rykunov c1f294790e [rd] IJPL-171239: Frontend should wait for ProjectEntity creation on the backend
GitOrigin-RevId: 632bfdf42cfcac53c4ec4add5b7070fd9aafe2f1
2024-11-26 11:25:50 +00:00
Nikolay Rykunov 974b1d1861 [rd] IJPL-171239: Wait while the ProjectEntity becomes visible in the current coroutine scope
GitOrigin-RevId: e0973a0729575a26a6e87a37e020a7636c9e191d
2024-11-26 11:25:50 +00:00
Frederik Haselmeier 26340dea20 [kotlin] Add conflict if nested Kotlin properties/methods are moved that are referred to by Java code
KTIJ-28862

GitOrigin-RevId: 6f7de83360a718c2ee5957e85716bb3ad3e8c181
2024-11-26 11:10:16 +00:00
Frederik Haselmeier d77e86c64a [kotlin] Moved K2 UsageInfo to its own package
KTIJ-28862

GitOrigin-RevId: 0d6cb988c934a16b244481b5af6af396d4ecaf98
2024-11-26 11:10:16 +00:00
Frederik Haselmeier 62ebbe5db8 [kotlin] Added K2 intention to move members to top level
^KTIJ-32001 fixed

GitOrigin-RevId: 550fb97d92e32144bb2ab4a6a7e1461f956e0e56
2024-11-26 11:10:16 +00:00
Frederik Haselmeier e91c6650db [kotlin] Added ability to move nested declarations using K2 move refactoring
The nested declarations are first converted to be effectively static if they capture an outer class.

^KTIJ-28862 fixed

GitOrigin-RevId: c035ba0350702f8934a1258b408521afc8736ea8
2024-11-26 11:10:16 +00:00
Sergei Vorobyov d3f50d6114 [Gradle|Exec] fix: resolve Gradle JVM arguments from the gradle.properties file in the build root
The IDE resolves build root by the defined working directory in the BuildEnvironment. We have two cases where working directory isn't a build root:
 1. Working root corresponds to the Gradle subproject. In this case, we find the nearest parent directory with settings.gradle[.kts] file. This directory will be our build root.
 2. Working root corresponds to the Gradle subproject in the included build. This case, also, can be divided by two cases:
    * We execute a Gradle run configuration. In this case, we resolve the working root like as we do it in the first case.
    * We execute a Gradle sync. In this case, we reuse the BuildEnvironment from a parent included build or project root build. Then we use it for the resolution from the first case. This case may happen only on the old Gradle versions, because the Gradle is newer than 8.0 can resolve all included builds inside the one Gradle model fetch request.

Issues IDEA-363359, IDEA-344664

GitOrigin-RevId: ccc73b78321d1a6983a897f34cfaff3493dd3e5b
2024-11-26 11:08:22 +00:00
Sergei Vorobyov 551779eae8 [Gradle|Exec] fix: reuse already collected Gradle build environment for configuring operation for execution
Issues IDEA-363359, IDEA-344664

GitOrigin-RevId: 8da1caff1aeafeb44f3ff25f60eaa4996b320882
2024-11-26 11:08:22 +00:00
Sergei Vorobyov b7efc9b41c [Gradle|Exec] cleanup: remove the ProjectResolverContext#getConnection function
The Gradle connection can be redefined during the Gradle sync. Therefore, the API cannot guarantee that connection is open in any sync moment.

Issues IDEA-363359, IDEA-344664

GitOrigin-RevId: bb42168971d564bb3fe427fa13d9b1f70782cb44
2024-11-26 11:08:22 +00:00
Sergei Vorobyov 5ab82d7d23 [Gradle|Exec] cleanup: replace the GradleProjectResolver#getProjectDataFunction function
The complex ProjectConnectionDataNodeFunction can be replaced by the two simple functions that prepare Gradle connection and adds error handling for the Gradle sync execution

Issues IDEA-363359, IDEA-344664

GitOrigin-RevId: 1652df80f00e61d765db7c8a55f60931361d5318
2024-11-26 11:08:22 +00:00
Sergei Vorobyov cf02931f5b [Gradle|Exec] cleanup: simplify the GradleProjectResolver#resolveProjectInfo function
Issues IDEA-363359, IDEA-344664

GitOrigin-RevId: 856fa4b2e45181c7cd0beb4cd6d2d6497a6e3c7a
2024-11-26 11:08:22 +00:00
Sergei Vorobyov 130b157e33 [Gradle|Exec] cleanup: make the ProjectResolverContext#getSettings function result as not null
Issues IDEA-363359, IDEA-344664

GitOrigin-RevId: 300513fd1720e2903d7d16051b14744dd621f6ec
2024-11-26 11:08:22 +00:00
Sergei Vorobyov 56122ac611 [Gradle|Exec] cleanup: use GradleExecutionHelper's static methods directly
The GradleExecutionHelper#execute function does not need to be overridden. Therefore, the GradleExecutionHelper class can be converted to the canonical utility class.

Issues IDEA-363359, IDEA-344664

GitOrigin-RevId: e79da247877fa953b776fbb6fc1f6140fb9608b5
2024-11-26 11:08:22 +00:00
Sergei Vorobyov 46e5149c0c [Gradle|Exec] cleanup: simplify the GradleExecutionHelper#setupJvmArguments function
Issues IDEA-363359, IDEA-344664

GitOrigin-RevId: 3ea6302a159d58e9b60b8defec00b92a535f771e
2024-11-26 11:08:22 +00:00