Morgan Bartholomew
3ba0b83ef5
[python] PY-81789 filter unhelpful declarations for GTD
...
(cherry picked from commit 0fba00400382b32bbdbb1d6112126b4097895f2f)
IJ-MR-165350
GitOrigin-RevId: f5eb23d9502eb60757a166a7b248724a82ecf647
2025-06-20 17:44:11 +00:00
Morgan Bartholomew
0d5e6eba2f
[python] PY-75556 support Literal types in kwargs
...
(cherry picked from commit 3f337bde1e7828f8497b4a91830aa019217f2d26)
IJ-MR-164945
GitOrigin-RevId: f40d54b555e646659ebf43093d076ce46e51286d
2025-06-06 03:38:31 +00:00
Morgan Bartholomew
b28a95c4f2
[python] PY-80931/PY-53288 use multi resolve for go to definition
...
(cherry picked from commit f24e72030f04a59f27cb9189b20716beb92a81d0)
IJ-MR-164825
GitOrigin-RevId: fb5d2b7a715f5f681a37cd6b39bfca60d4e9da66
2025-06-05 18:35:29 +00:00
Morgan Bartholomew
c19c717c6b
[python] convert PythonTestUtil to kotlin
...
(cherry picked from commit 1d58e2cdd5424613f798f44290b882d06c8a5474)
IJ-MR-164825
GitOrigin-RevId: 005ad60f89df08161ea7ebe5dfbb53eca23d5c6e
2025-06-05 18:35:29 +00:00
Morgan Bartholomew
7d18c4c6a8
[python] Rename PythonTestUtil .java to .kt
...
(cherry picked from commit a28a0223bde1c5369add10f377d3647091ee160b)
IJ-MR-164825
GitOrigin-RevId: 396b259680135d058e365b13b3ea1fec8eee7299
2025-06-05 18:35:29 +00:00
Morgan Bartholomew
bcbdea3af7
[python] PY-76845 NamedTuple compatible with tuple
...
(cherry picked from commit 7f317902f2df8f5cb099924b42b2b08aaaa724fd)
IJ-MR-164103
GitOrigin-RevId: 91cecc5360756f222d62f9555cae6370281b8e6f
2025-06-03 11:25:30 +00:00
Petr
613ca4396b
PY-79330 Assertion fix
...
GitOrigin-RevId: 57599c47328eb97136b44e75c4e3341780e6ba50
2025-06-01 12:07:43 +00:00
Petr
d480fe10a4
PY-79330 auto() enum value revealed as auto, not int
...
(cherry picked from commit da6ceff05411f63d49933fb53ad9ccf4cdb5bc37)
GitOrigin-RevId: 4d86253fc663f1db85ae3afface3d9e16de2101b
2025-05-28 19:28:40 +00:00
Petr
0ff784051a
PY-80565 False warning auto not assignable to StrEnum
...
(cherry picked from commit 6e9bf2dad1ca9d421d433def0d1c323a1fd3b301)
GitOrigin-RevId: d01ee3e16a8622ce0aa788b246bad7ff102f42de
2025-05-28 19:28:39 +00:00
Ilia Zakoulov
d1b3810a10
PY-77360: Introduce tests for PyDocStringGenerator
...
GitOrigin-RevId: c1556f7c6df988b34f88070b9ce73edfac1e8040
2025-05-26 18:01:26 +00:00
Morgan Bartholomew
9783c1022d
[python] PY-80775 don't error on every param spec
...
(cherry picked from commit ef1926878a81d524ef848f3d4b987abd0c062047)
IJ-MR-161660
GitOrigin-RevId: 757c6e95a30ff8a2bc6d6533e1098561f89409b3
2025-05-23 09:44:42 +00:00
Morgan Bartholomew
a96d82325e
[pycharm] PY-80704 substitute param specs when collecting generics
...
(cherry picked from commit 06a0a758b1cebb9b05f0dcfa4dc860289283b131)
IJ-MR-161505
GitOrigin-RevId: 01bdea5c3b1cbee8c1fb38bf0bd1a366ed3623a9
2025-05-22 18:33:56 +00:00
Aleksandr.Govenko
7e7f8e464a
PY-80421 PY-80471 PY-80824 PY-80550 false "unused variable" with for nested in if/else
...
PY-80564 Fp "Local variable might be referenced before assignment" when returning a comprehension in `try/except`
PY-80733 Fp "Local variable might be referenced before assignment" for `try/except` with a `break` inside a loop
Merge-request: IJ-MR-162320
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
(cherry picked from commit f3e5d76e1fb15e2951d395fa27768269e4d0cb8f)
IJ-MR-162320
GitOrigin-RevId: 76322f34176e25dd5cf4bc7fd329a9bbc8c7abd5
2025-05-16 17:01:43 +00:00
Aleksandr.Govenko
b571f8a1a3
PY-46592 Use of function parameter marked as possibly used before assignment
...
Create DELETE instructions only for unqualified names, as it seems we don't need other ones at the moment.
Merge-request: IJ-MR-159047
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
(cherry picked from commit e0d9c636c20facf587cb96d8117e6f5f804b847a)
IJ-MR-159047
GitOrigin-RevId: df8a820d13d2cffba0b24db975b30dfce809a678
2025-05-16 14:06:26 +00:00
Aleksandr.Govenko
5eac7df043
PY-79716 Incorrect type for a pattern variable shadowing the match subject
...
(cherry picked from commit 3d39751180b847dffd64e40e9e1cdbf2a38ab5e0)
IJ-MR-157338
GitOrigin-RevId: 18cc6b3f3186692f5c3e1dc2c542279551686a0e
2025-05-15 19:48:04 +00:00
Pavel Karateev
ed7e7f9ac8
PY-81022 add test for collections.abc compatibility check
...
(cherry picked from commit 52c0b9f915887c8321a1764e4ce1989fc1fd3bea)
IJ-MR-162556
GitOrigin-RevId: 70e646fbfa8ca750c00aa0aaa2e5bb66f977db8c
2025-05-15 11:12:15 +00:00
Aleksandr.Govenko
9263d8e6f2
PY-79910 Variable incorrectly marked as unused or redeclared without usage in nested try/if blocks
...
When there is no `finally` in try-except statement, use transparent exit instruction to tie all normal exits from try-, else- and except- parts to the next instruction
Merge-request: IJ-MR-158265
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
(cherry picked from commit 734581b732a1a558b72811fdda977c470d045cc9)
IJ-MR-158265
GitOrigin-RevId: d3ca0e258fcbd71f014245f05e954c95a3c2a0ca
2025-05-14 17:50:23 +00:00
Aleksandr.Govenko
d8f57b77c6
PY-80524 Explicit return statement expected false positive for an if inside try / except
...
(cherry picked from commit 6877fc7b34622d7ae884233af96e06ea92c918c1)
IJ-MR-161824
GitOrigin-RevId: 8c3219ea8bb8f547f7c314af8cb0d432c042cd7c
2025-05-11 22:28:24 +00:00
Daniil Kalinin
7b3539928c
PY-80860 Correctly recognize Python expression fragments inside template strings with HTML injections
...
GitOrigin-RevId: 8e5250fc40ac9bfc87cc451cd01061d8027d754b
2025-05-09 11:12:02 +00:00
Daniil Kalinin
bc182ae806
PY-79967 Add a couple of tests for template strings to PythonParsingTest
...
GitOrigin-RevId: b760b2c6a0aa93118971c005a7ebe680d0c5000c
2025-05-09 11:12:01 +00:00
Mikhail Golubev
476ec04182
PY-80844 Make the names of the negative tests more explicit
...
(cherry picked from commit 20e1f4c4f380d74ee0400283e6651069c4ad698a)
GitOrigin-RevId: 8b0b1e02e4eb29b0278802092e3c2be17bd27cec
2025-05-09 11:12:01 +00:00
Mikhail Golubev
004fee8632
PY-80844 Disable the intention for converting f-strings into t-strings in Python < 3.14
...
(cherry picked from commit 97162fca82d36958d61641c56315295329018304)
GitOrigin-RevId: bd8a473ec0c175b8c5fdb49feec919c944777e81
2025-05-09 11:12:01 +00:00
Mikhail Golubev
f13659e3d5
PY-80850 Add support for Template strings as arguments of positional and keyword varargs
...
(cherry picked from commit a51c198623553ee9f0975c2b3bf7af0c86c88b7a)
GitOrigin-RevId: 72fbe0ba4137e2f02236979bbd84440ca7616c6a
2025-05-09 11:12:01 +00:00
Mikhail Golubev
388e48d5ad
PY-80850 Insert "t" prefix on completion after "{" in regular strings where Templates are expected
...
(cherry picked from commit 6cc25474c2392b6b5de9958e58bb87db86854c5f)
GitOrigin-RevId: 74d7db586a75a3614481c29873a0a86b33416cc2
2025-05-09 11:12:01 +00:00
Mikhail Golubev
1cc8316591
PY-80844 Add a new intention for converting between f-strings and t-strings
...
(cherry picked from commit be3ab4d72de05a92c986af31ac8e40309d9754b1)
GitOrigin-RevId: fba9757978f5f669aa63e2657a3fcbd2923bec74
2025-05-09 11:12:01 +00:00
Daniil Kalinin
547c4d4feb
PY-79967 Add a couple of tests for t-strings type
...
(cherry picked from commit 3899f67f814b7a0d197db662d3f64693ef61208a)
GitOrigin-RevId: 75ea78468b2119099b9fdc3cc9058afdd17827e4
2025-05-09 11:12:01 +00:00
Daniil Kalinin
51d4206da4
PY-79967 Support HTML injections inside template strings
...
(cherry picked from commit 435d956e12f08c2a51c1f772cdbfa91901135e4b)
GitOrigin-RevId: 179bf452364c943be8c4cc58c263f5cb79935a1d
2025-05-09 11:12:00 +00:00
Daniil Kalinin
f1be127202
PY-79967 Add a test for t-string in PyCompatibilityInspectionTest
...
(cherry picked from commit e431991078a31bd10e934a76e6446a5a5e30f816)
GitOrigin-RevId: da52cba702f089853b64e7687af4964443c53c48
2025-05-09 11:11:59 +00:00
Nikita.Ashihmin
3b0bd68bc4
PY-79958 Python Packages: Improve progress notification
...
(cherry picked from commit 3d68461a0d46a128f89582f536b2917209f35c85)
GitOrigin-RevId: 47a71616e0565180922867c28c58acfc289db22a
2025-05-09 10:40:55 +00:00
chbndrhnns
3a81c685bc
PY-54168 Moving class from __init__.py into own module removes it from __all__ attribute
...
(cherry picked from commit 534dfcb5ea6a6289d622236fed7cc859bc5ff030)
IJ-CR-162065
GitOrigin-RevId: 31a86bd9d1d229554c1573e2ba65ebc3539c7b33
2025-05-05 17:42:17 +00:00
Mikhail Golubev
b7354185a3
[pycharm] PY-38169 Remove redundant mock files from the test data
...
IJ-MR-159943
(cherry picked from commit 75ddcff9cca3209b93dc9b041e37b6726d264811)
IJ-MR-161809
GitOrigin-RevId: 62ecc76a7ec4b6f544a02528f97bedec4c4fae7a
2025-05-01 14:58:06 +00:00
Mikhail Golubev
e8ad5a580a
[pycharm] PY-38169 In quick documentation display .py sources as the origin for .pyi declarations
...
In particular point that `collection.abc` symbols are defined in _collections_abc.py.
IJ-MR-159943
(cherry picked from commit be9b7c9c72ae668cd59f5981a025bc6de8a8ca90)
IJ-MR-161809
GitOrigin-RevId: 779e3c4e9a2216c366b9ade2817739918420c0f7
2025-05-01 14:58:06 +00:00
Mikhail Golubev
12609db31a
[pycharm] PY-80432 Fix navigation on collections.abc in imports from Typeshed to _collections_abc.py
...
IJ-MR-159943
(cherry picked from commit cc83e34de632c134a81c2d285b3c445ad76d2331)
IJ-MR-161809
GitOrigin-RevId: 66dca55d173d38d0a54df0c51220d0aa6bb5456d
2025-05-01 14:58:06 +00:00
Morgan Bartholomew
11f54723c8
[pycharm] PY-38169 special case definition location for standard collections that are wrong in typeshed
...
IJ-MR-159943
(cherry picked from commit c580a6408408965d909680ddba9b5b062d1c4782)
IJ-MR-161809
GitOrigin-RevId: 819e8f906003c02b80072b7c00c8f9e27e83dad2
2025-05-01 14:58:06 +00:00
Morgan Bartholomew
fa4b4eec34
[pycharm] PY-41827 check for union types in PySimplifyBooleanCheckInspection
...
to avoid ambiguous conditions
(cherry picked from commit f11c08f8dfea453a6676173bae57f96233429970)
IJ-MR-159379
GitOrigin-RevId: b700b1e5e7c077da7b61661d33c2a3aa135d9e21
2025-05-01 02:46:56 +00:00
Timur Malanin
ff86ab4b82
PY-79792 Refactored repository handling in Python packaging subsystem. Unified repository management by removing redundant methods (packagesFromRepository, allPackages) and standardized package retrieval via getPackages from PyPackageRepository. Updated related classes to align with the new CompositePythonRepositoryManager and PythonRepositoryManager interfaces. Added Test. PY-80168 Replace latest text with real latest version.
...
GitOrigin-RevId: f9d826a84d469c75a0c66f34a308cdde16c2f5b0
2025-04-28 16:23:41 +00:00
Timur Malanin
88d748bbaf
PY-78954 Old code for managing the installation of Python packaging tools has been replaced with a new approach using PipManagementInstaller and provided only for PipPythonPackageManager. Added support for PyPackageManagerUI to uninstallig packages using PythonPackageManagerMoved the isConda utility function to a more appropriate location. Added initialization of sdkAdditionalData with PythonSdkAdditionalData during mock SDK creation, because sdk must be flavor-specific.
...
(cherry picked from commit f4fb9a61293eeae1144c993b4bd161e155bbe7d7)
IJ-MR-161409
GitOrigin-RevId: e34b13429152997a83a70d925627fb54926053ee
2025-04-28 12:36:02 +00:00
Aleksandr.Govenko
5bf9f9ff39
PY-80493 Inconsistent return inspection adding "return None" after every line in context manager
...
Merge-request: IJ-MR-160763
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
(cherry picked from commit b576e30d433d39e426c8854d3ad485594ac9e958)
IJ-MR-160763
GitOrigin-RevId: cf6a3a4c834ee1df160e1927af1b75eb16eec3dc
2025-04-24 02:27:25 +00:00
Petr
cb09c5a4f3
PY-76885 Conformance test failure: constructors_call_metaclass.py
...
Updated tests.
(cherry picked from commit 854d97694a821599b6fbbf70f37b07fb9b5b7bb5)
GitOrigin-RevId: 47aeec8a860068dce91621a68fb5b54a1e959bef
2025-04-23 23:27:31 +00:00
Petr
4a40e988e2
PY-76885 Conformance test failure: constructors_call_metaclass.py
...
Added multi-file test.
(cherry picked from commit e3105c8036c90b9571143ce7b2cc970813a5ed3b)
GitOrigin-RevId: fe9eae3be1de9d6c68525a239f52fba820c40c11
2025-04-23 23:27:31 +00:00
Petr
85584f3a48
PY-76885 Conformance test failure: constructors_call_metaclass.py
...
Separate test methods for better readability.
(cherry picked from commit f80f2a79a48ee77fa47624ea2d4714cb8ea464ea)
GitOrigin-RevId: 5cc858c9216cf7fe5ccb853ff855038972ff614b
2025-04-23 23:27:31 +00:00
Petr
36e436bd70
PY-76885 Conformance test failure: constructors_call_metaclass.py
...
Assignability of metaclass's `__call__` return type to a type being constructed should be used instead of class equivalence.
(cherry picked from commit 94ae5d5870ca7deedc42f381456d13cb08d97ffc)
GitOrigin-RevId: d9e49b5813bafebf7ae3349d6c3232eaeaf5d925
2025-04-23 23:27:31 +00:00
Petr
669d6e65e6
PY-76885 Conformance test failure: constructors_call_metaclass.py
...
Update Py3TypeTest.testMetaclassHavingDunderCall(): consistent signatures for `__new__` and metaclass's `__call__` methods.
(cherry picked from commit 21acd397dc5253b951957604d76171f5d6763919)
GitOrigin-RevId: 5e85e031003fba4479e400559a8636acea6749ce
2025-04-23 23:27:31 +00:00
Petr
9b70a7cf4a
PY-76885 Conformance test failure: constructors_call_metaclass.py
...
(cherry picked from commit d4ae8eb0303ec141c9766599ede8be1d3bb538fb)
GitOrigin-RevId: 90a67c7cc6266752ab8cdfa3379e95123c3959f9
2025-04-23 23:27:31 +00:00
Petr
c52f4bbadf
PY-80195 Literals of Enums broken after import (2025.1 EAP)
...
Consider enum attribute of an unknown type an enum member.
(cherry picked from commit 72c2fd37f18e4dde65d735f1032495df5aeda791)
GitOrigin-RevId: 7e56afe6a2d2efe0ea84ac20672aaf7712d8ed23
2025-04-23 23:27:31 +00:00
Petr
e1b380f8b9
PY-12132 Support ABC classes (pep-3119)
...
Report error for abstract method in non-abstract class.
(cherry picked from commit 824d45a310b95ada628d6e607ae1ced6e351d849)
GitOrigin-RevId: 446cfea2ab76611d13648c17d6f7419fdefa0954
2025-04-23 23:27:31 +00:00
Petr
42dd3f39bf
PY-12132 Support ABC classes (pep-3119)
...
A class containing at least one method declared with `abstractmethod` decorator that hasn’t been overridden yet cannot be instantiated.
Also report instantiation of classes that directly inherit ABC or have metaclass set to ABCMeta.
(cherry picked from commit 55cb4dc90c55ddc63991a4c3f6b50b4e34a3b4bd)
GitOrigin-RevId: b37ea24490dc5ce7dcce87adf21aa6fe31e0e9dc
2025-04-23 23:27:31 +00:00
Petr
f09b6239ad
PY-76824 Conformance test failure: directives_no_type_check.py
...
(cherry picked from commit d823c6dbc51959ec1d534814972b3323be8361cb)
GitOrigin-RevId: 2672df0698539b78d261e8667920072d2f921af7
2025-04-23 23:27:31 +00:00
Petr
b1b6fe88d3
PY-80169 Conformance test failure: exceptions_context_managers.py
...
(cherry picked from commit 9d0714edc4507cb90feb56f2ec72466b1b454c79)
GitOrigin-RevId: af485a6386b0c11fe348cbdfaa8b3767bf112cf5
2025-04-23 23:27:31 +00:00
evgeny.bovykin
5cdec66645
PY-78250 Call PyDataclassTypeProvider before PyTypingTypeProvider so that it has a chance to infer the dataclass type first
...
(cherry picked from commit 18230af949275e3f585ce806fec25144731e347b)
IJ-MR-158112
GitOrigin-RevId: 50ed312ca85b506cd1a8e8411b80548f81b56487
2025-04-23 12:07:33 +00:00