Commit Graph

458591 Commits

Author SHA1 Message Date
Aleksandr.Govenko
70fe60b4c8 PY-20710 Support 'Generator' typing class
Check YieldType of yield expressions in PyTypeCheckerInspection
Check that (Async)Generator is used in (async) function
Check that in 'yield from' sync Generator is used
Convert PyMakeFunctionReturnTypeQuickFix into PsiUpdateModCommandAction
Infer Generator type for lambdas
When getting function type from annotation, do not convert Generator to AsyncGenerator
Introduce GeneratorTypeDescriptor to simplify working with generator annotations


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

(cherry picked from commit b3b8182168c5224f0e03f54d443171ccf6ca7b89)

IJ-MR-146521

GitOrigin-RevId: a95670d7e2787015bcf162637ea6d7bfb47a312a
2024-12-17 20:59:50 +00:00
Tatiana Ber
362a0344a7 PY-77814 Update text in messages
GitOrigin-RevId: f04fcb10130b6fe79516d36b0b16c3f38dcc2462
2024-12-17 19:40:40 +00:00
Vladimir Parfinenko
8c13685cde [debugger] use soft wraps int text visualization popups, IJPL-171620
^IJPL-171620 fixed


(cherry picked from commit 09e431fdccd59fc60eaa88fd63d4f01d43e0a84b)

IJ-CR-150031

GitOrigin-RevId: 1b447ca10e4aa98265d0b5543c69d8fd34bb5f5f
2024-12-17 19:22:15 +00:00
Aleksandr.Govenko
4dd41ee9f5 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>

(cherry picked from commit 9f58961f9eb70e4f9dbba7359f5aafdfd392b7e2)

IJ-MR-148719

GitOrigin-RevId: 68ef5c4a1cc0fcaffd750cc0713250a106136643
2024-12-17 18:16:40 +00:00
Max Medvedev
137b1d2b13 IJPL-171917 don't allow GrazieInspection to touch indexes in dumb mode
GrazieInspection can run in dumb mode after implementation of IJPL-155874.
But unfortunately, one of its filters (CommentProblemFilter) needs indexes.
So in some situations IDE gets stuck.

The easy solution is just to avoid checks requiring indexes.
A better solution would be to detect todo comments without indexes IDEA-364846.


(cherry picked from commit bc8962287f61eade48df703b7fa25dbd78fb83aa)

IJ-CR-151765

GitOrigin-RevId: 41df36e2ee169afedd2667c923afb36f932e6685
2024-12-17 18:05:04 +00:00
Dmitry Zhuravlev
f45c905fe2 git: extract gpg agent configuration action (IJPL-173525)
Follow-up: a6ec805357dd60578f2408a2ffaabadc53dad00e


(cherry picked from commit 771857ed0cafbdf74d9c82af47bd609a6bd58ea7)

IJ-CR-151739

GitOrigin-RevId: a537016fa7cae17945baf1b297696924d5281210
2024-12-17 16:26:16 +00:00
Dmitry Zhuravlev
f4380c4522 git: add a registry key to control GPG Agent configuration proposal (IJPL-173525)
(cherry picked from commit a6ec805357dd60578f2408a2ffaabadc53dad00e)

IJ-CR-151739

GitOrigin-RevId: 9b042866d32efa53fcc23e6aafaaf91481f9d8d1
2024-12-17 16:26:16 +00:00
Aleksandr.Govenko
bdbe78b63a PY-60714 PyCharm does not understand async iterators
__anext__ method is required to return Awaitable. When getting iterated type, unwrap that awaitable


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

(cherry picked from commit 97a070ead70c0ec0f2da08000517c592c5805965)

IJ-MR-150432

GitOrigin-RevId: 21dc20b164e6095e56707ea50bc93bf67564e88e
2024-12-17 15:42:06 +00:00
Piotr Tomiak
da3a2976a7 IJPL-31694 Dots appears by hovern some links in quick-doc pop-ups
(cherry picked from commit 1a72c5a070226925da44c61612ed6995fef7ba84)

IJ-CR-151642

GitOrigin-RevId: d7a7d513843a85df4ac91cbab7f42d157ce6dd1a
2024-12-17 15:35:26 +00:00
Mikhail Golubev
31678081b3 PY-77167 Simplify resolve logic for overloads, get rid of RatedResolveResult#RATE_LIFTED_PY_FILE_OVERLOAD
If there is an overload not followed by an implementation, which is
already an error, always resolve to the first overload, regardless
of whether it's a .py file, or a .pyi stub. It allows us to eliminate
the special RatedResolveResult#RATE_LIFTED_PY_FILE_OVERLOAD rate in .py
files, because we no longer need to duplicate the last, closest reachable
overload (normally an implementation should be reachable) with a higher
priority, and then filter it out during overload resolution.

Meanwhile, this filtering out didn't work right before
because some type inference logic, e.g., PyCallExpressionHelper.getCalleeType
used in PyReferenceExpressionImpl.getCallableType bypassed it. It should have
been done at the level of
PyCallExpressionHelper.forEveryScopeTakeOverloadsOtherwiseImplementations.


(cherry picked from commit 99a624ab85957d7a2d3c2c0ced596e472f9d615b)

IJ-MR-148398

GitOrigin-RevId: c2cdfe8c8b046118f4e6f7269dbf7848dd746e08
2024-12-17 15:33:39 +00:00
Shumaf Lovpache
dc39c7d32d [JavaScript Debugger, script debugger] WEB-70558 support reading of array of object or single object value
In r1359167 Google introduced a breaking change: the type of the `Debugger.scriptParsed.debugSymbol` field was changed from `Debugger.DebugSymbols` to `array[Debugger.DebugSymbols]`.

To provide backward compatibility with old browsers, this fix introduces a new reader method `readObjectArrayOrSingleObject` which used if some object property marked with `JsonArray` annotation.


(cherry picked from commit 7847455a7c59cf7c7af3de9b991f2b6ca51928e7)

IJ-CR-150473

GitOrigin-RevId: ae6d2a42490bdcbf867d2727ce8207695d6ee3c5
2024-12-17 15:11:26 +00:00
Mikhail Golubev
714c16f197 [python] Simplify PyResolveUtil#resolveQualifiedNameInScope
(cherry picked from commit 6b95f07ddffbbd246e5c3a852de42c0cc19098ce)

IJ-CR-151380

GitOrigin-RevId: 24a9cb2f52bdc9ace2e2d21ac0d0f2e002451dae
2024-12-17 14:53:28 +00:00
Mikhail Golubev
66f10b6356 [python] Make PyResolveUtil.resolveQualifiedNameInScope automatically traverse scopes
(cherry picked from commit 6013fdabf6967a193a60849ec0e81e153380b4b7)

IJ-CR-151380

GitOrigin-RevId: 7f238ba2bee90f15dbe9c76cbf4e089a48f52870
2024-12-17 14:53:28 +00:00
Mikhail Golubev
651f6c3310 [python] Add a clarifying comment in PyDataclassInspection
(cherry picked from commit 1f109781ad81e2b5db578a384ee5dba6b1cbbccf)

IJ-CR-151380

GitOrigin-RevId: 45a480dba35bf14df8afcd3c69707603ff5c8f19
2024-12-17 14:53:28 +00:00
Mikhail Golubev
ab6adac4d4 PY-77433 Fix resolving qualified names in field_specifiers argument of @dataclass_transform
Previously, we mistakenly tried to resolve qualified names listed in the
`field_specifiers` argument of @dataclass_transform in the same scope
where the dataclass itself is defined, not where the actual decorator
application is located.

Thus, if in the file where the dataclass is defined, a field specifier
was imported differently than where @dataclass_transform was applied, we
couldn't recognize a field specifier call in the RHS of an assignment as such
and took it for an ordinary field default value.

In particular, this is what happened with pydantic dataclasses.
`pydantic.fields.Field` is usually imported as just `pydantic.Field` where
user dataclasses are defined, but imported with an alias and set in the
`field_specifiers` argument as `PydanticModelField` in
`pydantic._internal._model_construction` where `ModelMetaclass` is defined.

It was accidentally broken in f15a07836e7aeac7c46b489b4742e8248a0e6ef4 to
support decorating class methods with dataclass_transform
(see testData/inspections/PyDataclassInspection/DataclassTransformFieldsOrder/decorator.py).
Until PyResolveUtil.resolveQualifiedNameInScope automatically traverses through
containing scopes looking for a name, the file containing decorator application
seems like a safe trade-off for the scope, because field specifiers are normally
defined or imported somewhere at the top level.


(cherry picked from commit de9afeb0831a52f058453fe678de229d41c26a4d)

IJ-CR-151380

GitOrigin-RevId: b6576ec7b72ea1e19e93b6190372a5168003c396
2024-12-17 14:53:28 +00:00
Eugene Zhuravlev
a45d559f88 review follow-up: correct logging (IDEA-363192)
(cherry picked from commit b5e82476bd9b8200b77b6fed06dbfdd6940aab93)

IJ-CR-150469

GitOrigin-RevId: cac4c686bf67262eaf28af6e7444501c2dfd6ca4
2024-12-17 14:50:59 +00:00
Eugene Zhuravlev
b334dfb23e review followup: rethrow first error from postponed runnables and log others (IDEA-363192)
(cherry picked from commit 6903f29259bd0c3888cc7b270de26f9f4affd31f)

IJ-CR-150469

GitOrigin-RevId: 7215056665cc06187eacb73be0d7e868361316b9
2024-12-17 14:50:59 +00:00
Eugene Zhuravlev
397601365f fix deadlock when service was called from EDT; more reliable Future completion (IDEA-363192)
(cherry picked from commit 8cad354fe3aca848312026b4a670bd71cfe40e62)

IJ-CR-150469

GitOrigin-RevId: d7637501a7a11d02c3d6050246d42e2563e34275
2024-12-17 14:50:59 +00:00
Eldar Abusalimov
24faeed3f3 IJPL-173167: RegionUrlMapper: Wrap tryMapUrlBlocking() with try-catch
It is better to be more explicit there, both for the sake of readability,
and to ensure safe evolution of the implementation.

Follow-up: IJ-CR-151167 IJPL-173167: RegionUrlMapper: Add async `tryMapUrl()`, migrate most of the usages
(cherry picked from commit fbeba1c512b23975f8676b2def05c6c863f2c835)

IJ-CR-151167

GitOrigin-RevId: e246a05f9efa16ed2b45120645947d62962b2605
2024-12-17 13:49:29 +00:00
Eldar Abusalimov
c1f3b0480d IJPL-173167: RegionUrlMapper: Don't cache empty mapping on loading failure
Expose a public method `loadMapping()` that allows for proper error propagation.

(cherry picked from commit a0a6f6492773d5f4384ded84a6d0309c017f5fe6)

IJ-CR-151167

GitOrigin-RevId: c9f6a84c74a261369ce585fa14e6a5b156e12842
2024-12-17 13:49:29 +00:00
Eldar Abusalimov
745eec2dd7 IJPL-173167: RegionUrlMapper: Add async tryMapUrl(), migrate most of the usages
(cherry picked from commit ade613abdad254930eab50cdafda560ff7fee62d)

IJ-CR-151167

GitOrigin-RevId: 322cf6966db2abe30f54de055790a73d6121afb7
2024-12-17 13:49:29 +00:00
Eldar Abusalimov
5b3d80c496 IJPL-173167: RegionUrlMapper: Rename mapUrl() to tryMapUrlBlocking()
(cherry picked from commit 8fbd2938cf053623f7715b7faef914efbe2304f4)

IJ-CR-151167

GitOrigin-RevId: 4212535e6f8d53ebb631dae1f65de06fab4ca3be
2024-12-17 13:49:29 +00:00
Eldar Abusalimov
7fc45d4c12 IJPL-173167: RegionUrlMapper: Make mapUrl() @NonNull to improve Kotlin interop
(cherry picked from commit 2c12c6cb1ae2baae45d0c114f7d0031268e1c721)

IJ-CR-151167

GitOrigin-RevId: 804b174fad1d8739a9d1e118d13b73a475ab22ed
2024-12-17 13:49:29 +00:00
Eldar Abusalimov
7bddfd3c5d IJPL-173167: RegionUrlMapper: Extract RegionMapping nested class
(cherry picked from commit daa61c863b6fb504e7c02e0b6da458fa169276da)

IJ-CR-151167

GitOrigin-RevId: f245fc21196427fdb8d54fca3c279a35f8b80b66
2024-12-17 13:49:29 +00:00
Petr
3db29fcbc8 PY-36205 False unresolved attribute reference for enum value when enum inherits str or StrEnum
(cherry picked from commit 132c996908988bccc59035c033c21325c48a6016)

GitOrigin-RevId: 8a968f2c4b2bac5c77ca60b1e22b78afc77b1eef
2024-12-17 13:31:48 +00:00
Andrey Vokin
1f72432cd7 PY-74269 In-product survey about the user's job
(cherry picked from commit 11cde9a1ce72ed0342739ec26b5deaf7cc163c5d)

IJ-CR-151713

GitOrigin-RevId: 4cd0ff5d3551bc8afe8521b989a3358fd88d4c90
2024-12-17 11:04:58 +00:00
Vyacheslav Moklev
7ff58de431 [RDCT, IJPL] IJPL-172535, IJPL-173465: Remove default value of i18.locale registry key
(cherry picked from commit cbe01d9cc089b58c5634e6e166d6093ebc4ea792)

IJ-CR-151425

GitOrigin-RevId: b6638f101d5bcae2a9c8fefba7f899526d8bbd53
2024-12-17 08:38:55 +00:00
Nikita Tsarev
1cf3748c14 IDEA-364446 Bump the maximum JDK version for a smoke check when choosing SDK
(cherry picked from commit 690cdc39175f1269ce1893b7e54fcc92f06a0715)

IJ-CR-151133

GitOrigin-RevId: 0e8f01469d46818c4eab7573694c1336d2cace8d
2024-12-17 00:07:44 +00:00
Sergey Pak
50708e5bd2 fix IJPL-157487: Don't allow editor to use raw global scheme (not delegate), enforce using MyColorSchemeDelegate inside EditorImpl
(cherry picked from commit d62fc893f947dc9981e24d756a227227427b7d92)

IJ-CR-151499

GitOrigin-RevId: 8d9ccca5725021d2eafb0d58c5cdf144c1f85816
2024-12-16 21:13:50 +00:00
Chris Lemaire
93a034db6d [github] Fix actor subclasses not loading properly
Every Actor subclass that exists as far as I could tell
now has a DTO representation and a fragment representation.

Sure, there's a lot of common classes, we can reuse actorInfo
in some cases, but I somewhat prefer having the specific fragment
to reference at the DTO class.
Just so that debugging these types of issues is easier later.

actor.graphql now directly represents the 5 possible instantiations of Actor.

(cherry picked from commit 6392ac4ce579ce48682d8cc288d2edfe5480da86)

IJ-CR-151664


(cherry picked from commit bd235370481269453094021d2e03ed91bb48903b)

IJ-CR-151664

GitOrigin-RevId: a6cc560b78552c1ca9003975c0b9fb03fd68b69d
2024-12-16 18:27:38 +00:00
Chris Lemaire
f1beec151e [github] Update GQL schema
(cherry picked from commit 2e96974e51256e543f58e62b0f0cfcee62f2c688)

IJ-CR-151664


(cherry picked from commit 493ef666029e6645dbc0d5a78ae25f1619692b91)

IJ-CR-151664

GitOrigin-RevId: d0bee915b7f5b46acb70bc7852caa6e00f6550ed
2024-12-16 18:27:38 +00:00
Chris Lemaire
3ee01d2447 [github] Add missing definitions for GHBot fragments
(cherry picked from commit 06c9f4826ca67ef72cc6c0776d1417d679c68c4f)

IJ-CR-151664


(cherry picked from commit 59e565b8f1a3ae0a6c18ffd38e05e693bb17987d)

IJ-CR-151664

GitOrigin-RevId: d66becb2a7a6abe150c649dd56b65eb9e9e276f4
2024-12-16 18:27:38 +00:00
Ivan Semenov
a7529af50b [github] add default impl to polymorphic DTOs
This ensures forward compatibility

(cherry picked from commit b1192cd40b7fa86d9f32ff1aade8ec602d70e5ed)

IJ-CR-151664


(cherry picked from commit b86b39bef15d35114bd96ee1a509fe15b5dc3079)

IJ-CR-151664

GitOrigin-RevId: b13579c168028715125bda11fe78d6292265f3b2
2024-12-16 18:27:38 +00:00
Alex Plate
7c0a2e792f [IJPL-162329] Collect FUS information about the installed editors.
For the moment, only the information about the .vimrc configuration file is collected.


(cherry picked from commit a0f467ff132dc51dafbff746529375c82486fdf6)

IJ-MR-151660

GitOrigin-RevId: 7f5c47a6189bd40413936fb1c64493b9347efc78
2024-12-16 17:50:25 +00:00
Ivan Semenov
0f3d5b9334 [github] add missing subtypes of GHPullRequestRequestedReviewer
#IJPL-79734 Fixed
#IJPL-172070 Fixed


(cherry picked from commit 66b4ad29567426bfa220fb0eb36830d1a4fa8ba3)

IJ-CR-150683

GitOrigin-RevId: 87aabffb9679751464e5eac17bfc642b72f798c1
2024-12-16 17:16:39 +00:00
Vladimir Lagunov
669a52ca85 IJPL-171949 IJent WSL FS: take care of Windows FS case insensitivity in IjentWslNioFileSystemProvider
Before this change, calls of `File.list` with a path `\\wsl.localhost\debian\tmp` led to an error if the distribution name is `Debian`.


(cherry picked from commit d4e4458349c4501f4a847599428f47d7543ba2ee)

IJ-CR-151160

GitOrigin-RevId: 8648915b0d6b73cdbf3b9172e959c0768087252f
2024-12-16 15:54:01 +00:00
Ilya.Kazakevich
b15a3376f3 Add GeneratorPeerImpl#getComponent default implementation.
Some plugins still call `getComponent` directly only to get exception.

We make it return `myComponent` until plugins migrate to a new API


(cherry picked from commit d5d4a4a526e236fe285b847992d677f3a92cc4b8)

IJ-CR-151522

GitOrigin-RevId: 6fe5d4bf5a87ef7320e473afd8af9942f2eb151d
2024-12-14 22:26:22 +00:00
Piotr Tomiak
43c65f02c8 Web Symbols: fix IOB exception
(cherry picked from commit 4b3b8e0c316b40fd870ea43d7d06cdd2a8c46b2a)

IJ-CR-151473

GitOrigin-RevId: 1e9b97602b3671857c2e13755e49866ebebafa80
2024-12-14 21:52:01 +00:00
Piotr Tomiak
be045e02bd WEB-70567 WEB-70386 WebSymbols: improve handling of directive selectors
(cherry picked from commit 57b9daad05afbc14ac06f27102e11d592c80374c)

IJ-CR-150932

GitOrigin-RevId: 5ca21996635ac3f2b639f371b092961a44d75ced
2024-12-14 18:57:02 +00:00
Piotr Tomiak
c2121af7a3 WEB-70567 WebSymbols: properly support standard HTML attributes with enumerated values
(cherry picked from commit 1dd2997721d943b7a1c1d461a80a0eab6d68c4aa)

IJ-CR-150932

GitOrigin-RevId: e3a549d20ecdbdfd1d738c91decc16464be91e2e
2024-12-14 18:57:02 +00:00
Eugene Zhuravlev
972970502f review follow-up: exclude unnecessary artifact (IDEA-361854)
(cherry picked from commit 93023adc668f27bb97a17f8b67db0170b669db09)

IJ-CR-151097

GitOrigin-RevId: 21b4056504917741a49b1a796f5b3409d19461bd
2024-12-14 16:00:00 +00:00
Eugene Zhuravlev
578a6bb592 use netty-4.1 in jps; fix javac7 compilation (IDEA-361854)
(cherry picked from commit 2c42d875202ef69dc0c33447a1859e1941bae668)

IJ-CR-151097

GitOrigin-RevId: 3a496497189b778ccc267db98503cc7eb5a11fa5
2024-12-14 16:00:00 +00:00
Yuriy Artamonov
17ec277637 [plugins] IJPL-171513 Missing information about install ID in update checks for plugins
(cherry picked from commit 1908f2601dc80f0ff1dc245129ab0a1219439983)
IJ-CR-150654

GitOrigin-RevId: f54fe80fae80962a4add0d5c139066792531fcc8
2024-12-13 18:23:18 +00:00
Yuriy Artamonov
6ae50f4d5f [plugins] IJPL-171513 Missing information about install ID in update checks for plugins
(cherry picked from commit e23edbcf5841d137a7f635dcf2f54a729f43820b)
IJ-CR-150654

GitOrigin-RevId: d9ceb3c33c33a0d3fb64d1a32ae4f95423d2475f
2024-12-13 18:23:18 +00:00
Yuriy Artamonov
5222545a7d [plugins] IJPL-171513 Missing information about install ID in update checks for plugins
(cherry picked from commit 7b036374075465735845b3a95477f958b6d3046b)
IJ-CR-150654

GitOrigin-RevId: 5dd31fd3a799b2aa44c93fd0552018fed9861d05
2024-12-13 18:23:18 +00:00
Snapshot dependency; Vitaly Provodin; Ultimate / 243 / Service / Promote JBR 21 Runtime to IntelliJ 243, build #21.0.5b631.32
5f2f064034 Updating versions of project dependencies: runtimeBuild->21.0.5b631.32
GitOrigin-RevId: 7ed9a1787bce686490843feadd1afdb8b6d2de3c
2024-12-13 12:04:51 +00:00
Tagir Valeev
a35bbc7c9c [java-inspections] Preview feature warning: limit highlighting to method name
Fixes IDEA-362013 Stream.of should not be highlighted because it's not a preview feature


(cherry picked from commit 0818188d2e5ae25916c0433dfe976c808eebf869)

IJ-CR-151174

GitOrigin-RevId: c81154ec031a4da1ef432831628fe93537ce599b
2024-12-13 10:37:17 +00:00
Jakub Chrzanowski
f630f8ccd8 IJPL-158473 attach sources to bundledModule IntelliJ Platform artifacts
Signed-off-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>


(cherry picked from commit 5d694421ef2a3cc5846ce4fdc3320a73d4b1bf41)

IJ-CR-151317

GitOrigin-RevId: adef0280c7a8c33545ff8c47a6a9c714d64ed03c
2024-12-12 19:00:15 +00:00
Jakub Chrzanowski
9f15c8a644 IJPL-158473 remove the product prefix (like IC-) from the coordinates version, which was introduced with IJPGP 2.2.0
Signed-off-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>


(cherry picked from commit cc26859af9b25f3cdfb9967d8d8501bd3131d379)

IJ-CR-151317

GitOrigin-RevId: f28cb719fcd7a070ca356b8a430150b30f25e3e0
2024-12-12 19:00:15 +00:00
Mikhail Pyltsin
5ccf227f51 IJ-CR-151015 [java-decompiler] IDEA-364167 java decompiler failed to decompile bytecode from a kotlin class with default constructor argument
GitOrigin-RevId: 97d894594371fab7e4ba99c6a181b68e0a2a15d3
2024-12-12 14:17:19 +00:00