Mikhail Golubev
2ea12b55ab
PY-86002 Revert also PY-25989 PY-84544 to fix new test failures after the revert to weak unions
...
Namely, `generics_basic.py` in the conformance test suite and
Py3TypeCheckerInspectionTest.testTypeVarWidening.
Revert 07803c6243370d55df0d870e2e32b38170c1fb49
(cherry picked from commit 24d3313cb944dc2e511191efd3b4d2cf2631ac92)
IJ-MR-184663
GitOrigin-RevId: 97d42c56b99ca3c6bb663294524af53769977203
2025-12-03 21:51:25 +00:00
Petr
9465c4b585
PY-25989 PY-84544 Widen types during type parameters substitution
...
(cherry picked from commit 627673fc7ed27621df839a5c1d4d31e677ce7f8c)
GitOrigin-RevId: 34bf38c4d79fe08cdddfce9bfefb0d0b94a0f60e
2025-11-26 18:04:03 +00:00
Alexey Katsman
b30b281f5d
PY-85634: Make PyInterpreterInspection async for PyCharm
...
PyInterpreterInspection uses SDK configurators to find existing
environments and find the most suitable SDK. This operation takes time
(especially with conda on Windows), and on top it's performed on every
file change, making UI freeze all the time.
This change makes inspection asynchronous by caching the result and
triggerring inspection again to show changes on the UI.
Follow-up to IJ-MR-178613
GitOrigin-RevId: 889bdaac6a0a34cfca4d29d6a43eb95824b32fe4
2025-11-25 19:48:52 +00:00
Petr
eb823d2c9b
PY-83529 Use more specific method parameter type
...
(cherry picked from commit 7337c92fb37d3813505a7c7e2701044c36aba8a1)
GitOrigin-RevId: a48d6e9f2d7fa074598daeaad553e27d4bbac8d8
2025-11-12 17:43:51 +00:00
Petr
43d1cf2b58
PY-83529 Make type name reasonable (PyModuleType, PyImportedModuleType)
...
(cherry picked from commit a5f8641bcae3cd01eb7ff174e289cbf3ca5e3b2b)
GitOrigin-RevId: 5f0ea25eebe7329303e78b18c0ffa03c75c435d6
2025-11-12 17:43:50 +00:00
Petr
d950b4ef32
PY-83529 Do not resolve to empty skeleton package modules
...
(cherry picked from commit 699b50ea5e2be24852fc1c07acb4d372e760a251)
GitOrigin-RevId: 6369f512dff176c4ebb4ec4d45c57c37acec7df0
2025-11-12 17:43:50 +00:00
Marcus Mews
a056406edf
PY-84484 Pycharm hangs when trying to call specific constructor
...
(cherry picked from commit b15a3bab218f72c1e9c717facfbff3e91eeea13f)
IJ-MR-180106
GitOrigin-RevId: 1945dec57725c60c6580980e2f9e83289b0a2caf
2025-11-11 10:49:54 +00:00
Morgan Bartholomew
6b85c2b966
[python] lsp: fix windows executable
...
GitOrigin-RevId: 62c9f077960c6cd8a1bbb46e8eb52493104fddfd
2025-11-07 00:42:32 +00:00
Morgan Bartholomew
9cfd68381c
[python] PY-83505 TyExternalTypeProvider
...
(cherry picked from commit dd483d65b2b00b83988d694fe69d11022d68270e)
(cherry picked from commit 08bf517949b1c74c9561a449457b9d217688bb1e)
GitOrigin-RevId: a04f6395bd6d32ddb593789e1bd7ef9d375a0f40
2025-11-06 13:06:00 +00:00
Morgan Bartholomew
5e2fc151c1
[python] PY-83505 ExternalTypeProvider extension point
...
(cherry picked from commit 4c576007a0f84542f5b91f5e502d0e280c3d5b7c)
(cherry picked from commit 57ce4325e4948c00c38a8d362c97b89de3f8b854)
GitOrigin-RevId: 032bfa80819113a2cdc87443cc1a5c0bf12af849
2025-11-06 13:06:00 +00:00
chbndrhnns
5579292ff3
[python] PY-59260 False positive assigining IntFlag enum value to an annotated variable
...
(cherry picked from commit 1b231b0917c41032255e90b3f524fc3d6201e80e)
IJ-CR-181224
GitOrigin-RevId: e2969be0fd18d29a1c2ba00a7ac3ad1a87edf79e
2025-11-03 22:58:33 +00:00
evgeny.bovykin
96a0d7da31
PY-84538 Report protocol instantiation as an error
...
(cherry picked from commit ad941a5d9a5fb852b0c28cbf259fdcc5ce3f3efb)
IJ-MR-173617
GitOrigin-RevId: 97c2b967b5a2c42d0f1c6c5f09a65beb64bd634c
2025-11-03 16:01:01 +00:00
Marcus Mews
c7d6637615
PY-84545 PY-84716 Fix class loader problem
...
- use given clazz's class loader to avoid "is not visible from class loader" check in java.lang.Proxy.ensureVisible()
(cherry picked from commit 5d275b1353383691fe907caa039a15706e9b7a18)
IJ-MR-178968
GitOrigin-RevId: 11d8ea6498393b0101a7c7086d8402b24be2ed5a
2025-11-03 12:46:22 +00:00
Daniil Kalinin
489b9b90aa
[inspections] PY-85120 Do not consider expressions like a: list[int] | None = None a type alias
...
Target expression should have either explicit `TypeAlias` annotation or valid type expression in assignment without type annotation (to be considered implicit type alias)
(cherry picked from commit 1059a8df2d221bd068eee706139be20c256df549)
GitOrigin-RevId: 8c952138fbc4124f02f717ce8a1784c1f0dc86b2
2025-11-03 10:33:56 +00:00
Daniil Kalinin
1b197eb884
PY-85080 Add quick-fix to remove unused Type Parameters
...
(cherry picked from commit cbb9b8136d07350075a9af8b4bc5aaa8891edd73)
GitOrigin-RevId: 81c1ddc810da8ce9619fdb679a26938bdecdb38e
2025-11-03 10:33:56 +00:00
Daniil Kalinin
7d46075b5f
PY-84107 Fix Type Parameters mistakenly reported as unused in PyUnusedLocalInspection
...
(cherry picked from commit 0593c2290aa1c84dde96673297374efef2b27fc3)
GitOrigin-RevId: 56de9b7a6b305eb9e88dc2bf8281c93f788eae80
2025-11-03 10:33:56 +00:00
Daniil Kalinin
fcf1abdbb7
PY-84570 Do not consider bare list literal as a valid type alias
...
(cherry picked from commit f0bcd2445735caa7917944351140a2877d0b4ffe)
GitOrigin-RevId: 5f0a0bff41ee01b4e8b4f7e73c1062d523854c2c
2025-11-03 10:33:56 +00:00
Aleksandr.Govenko
8c745a5c22
PY-83339 Narrow X | None type to X after assert x
...
(cherry picked from commit a49863065bf26f615100b21f423a650cbebbcab3)
IJ-MR-178978
GitOrigin-RevId: 4bf02cab1e94a2ab1aaa70cb0b4578688cea88b9
2025-10-31 06:18:26 +00:00
Aleksandr.Govenko
5774a281fb
PY-84041 NullPointerException while opening .py with a number of case statements
...
(cherry picked from commit 1253ff8be848a2809634fa17acd2d0a1203849ce)
IJ-MR-178967
GitOrigin-RevId: 201674b48aa7089f04b116eaf3d4041932f9f98c
2025-10-24 17:56:36 +00:00
Morgan Bartholomew
00cdda225b
[python] PY-83733 ruff support
...
(cherry picked from commit df443269c3a29cfe9b5f3b67663a1f998396e738)
GitOrigin-RevId: f7d5bf3905cbe4e9092ee3976509777005f3f3bb
2025-10-21 06:20:05 +00:00
Morgan Bartholomew
1514a1fc00
[python] python-lsp-core
...
(cherry picked from commit e07d457d959a1b589861180c1be06b995218aa2c)
GitOrigin-RevId: 032d78e90ff3263c494ceeafb2411aaceb29c643
2025-10-21 06:20:05 +00:00
Max Medvedev
6ef13aa11e
[completion] IJPL-207762 nullability for LookupElement
...
GitOrigin-RevId: 31357e8a2d4e661cbc91a5642fe689cd3179a7e5
2025-10-12 11:39:37 +00:00
Vladimir Krivosheev
67a6dac7f8
IJPL-209476 IJ-CR-146078 kotlinx-datetime-jvm, kotlinx-document-store-mvstore, kotlinx-html-jvm, kotlinx-serialization-protobuf, kotlinx-collections-immutable
...
GitOrigin-RevId: 058331a1e834d7780456f98d003afe56abfc36a0
2025-10-12 11:10:47 +00:00
Vitaly Legchilkin
84934e9e9e
[python] (IJPL-205889) (BAZEL-2462) don't call getOrCreateAdditionalData for non-python sdks
...
+ add requirePythonSdk() verification for the Sdk extension functions, these methods are not designed to be called for non-python sdks and now will throw IllegalArgumentException.
also corrects dependency tree:
+ move PythonSdkUtil to the python.sdk module, remove dependency on psi.impl
+ create PySkeletonUtil for skeleton utils and leave it in the psi.impl
[python] (IJPL-205889) (BAZEL-2462) don't call getOrCreateAdditionalData for non-python sdks
+ add requirePythonSdk() verification for the Sdk extension functions, these methods are not designed to be called for non-python sdks and now will throw IllegalArgumentException
also corrects dependency tree:
+ move PythonSdkUtil to the python.sdk module, remove dependency on psi.impl
+ create PySkeletonUtil for skeleton utils and leave it in the psi.impl
GitOrigin-RevId: 20d958c5e15cc4e05545b2e61b126b5e015696ed
2025-10-10 18:17:28 +00:00
Vladimir Krivosheev
30413b84c9
IJPL-209476 IJ-MR-175479 extract jettison, jaxen, bouncy-castle
...
GitOrigin-RevId: d9f6e8e745fbfb69604eb02d0f95cad976d4d7f9
2025-10-09 21:36:26 +00:00
Nikolay Chashnikov
3a8344fcad
[plugin model] use 'public' visibility for content modules which classes are used from external plugins (IJPL-207059)
...
153 modules which contain classes used from external plugins from the Marketplace are marked as public. This is needed to ensure that it'll be possible to use that API after converting code from these external plugins to content modules.
GitOrigin-RevId: dc48e8970041fddd3bf50d280711e95ce9e9ad9b
2025-10-08 18:39:06 +00:00
Vladimir Krivosheev
4b619431c2
IJ-MR-175479 IJ-CR-146078 IJPL-209476 fast-util
...
GitOrigin-RevId: 87af2a3aad6e264a9b332c20ff572ec735f741f2
2025-10-06 16:34:02 +00:00
Vladimir Krivosheev
601a44264f
IJ-MR-175479 IJ-CR-146078 IJPL-209476 gson as product module
...
GitOrigin-RevId: 4e0ec5a56b91ff85cef4343c34f36e18adec1e9e
2025-10-04 19:03:47 +00:00
Vladimir Krivosheev
351374ca85
IJ-MR-175479 IJ-CR-146078 IJPL-209476 hash4j as product module
...
GitOrigin-RevId: 09cdcc9248d5b0f77ad594c48b44b08e5d50cae1
2025-10-04 19:03:47 +00:00
Vladimir Krivosheev
9f425c84ea
IJ-MR-175479 IJ-CR-146078 IJPL-209476 guava as product module (part 2)
...
GitOrigin-RevId: 22ee846c39d44cd481ad55d11889ff43ad3b389a
2025-10-04 19:03:47 +00:00
Max Medvedev
5dbaa86072
completion cleanup: use existing trimmed constants
...
GitOrigin-RevId: 240ae3e21585458a28038727b6b39a546ad566d8
2025-10-03 10:21:31 +00:00
Petr
3a137ebccb
PY-81941 Make CallInstruction.isNoReturnCall non-recursive
...
GitOrigin-RevId: 4c9c1e2c6a42b6632d84667a31fb4f46936405b3
2025-09-30 21:32:41 +00:00
Petr
59740119ac
PY-81941 Don't check NoReturn calls when inferring a function return type
...
GitOrigin-RevId: eef22498254ecee4e91c5dc3a29997a3d95e6ce1
2025-09-30 21:32:41 +00:00
Petr
28f2e8c56b
PY-81941 Remove unused fields (PyDataFlow)
...
GitOrigin-RevId: 2aab9bbfd1ff126a04246ae940629a7f2735b67e
2025-09-30 21:32:41 +00:00
Petr
9d4437ff1f
PY-81941 Remove an unused function (PyDataFlow.kt)
...
GitOrigin-RevId: 5bb5686062c77a040429c57dedc4757ef0c8e999
2025-09-30 21:32:41 +00:00
Morgan Bartholomew
e063afca9d
[python] PY-84524 support typing_extensions.Callable better
...
Merge-request: IJ-MR-177071
Merged-by: Morgan Bartholomew <morgan.bartholomew@jetbrains.com >
GitOrigin-RevId: c76a81acf712c4d8a86403bebbc6f1e92ec492e6
2025-09-30 14:45:13 +00:00
Morgan Bartholomew
eafca8d96d
[python] fix builtins.callable
...
Merge-request: IJ-MR-177060
Merged-by: Morgan Bartholomew <morgan.bartholomew@jetbrains.com >
GitOrigin-RevId: 2ec5c5ea1cc4183d757351f051b914a456ff15d8
2025-09-30 14:29:43 +00:00
Aleksandr.Govenko
663b57857e
PY-83597 False positive type narrowing in expressions with "and"
...
GitOrigin-RevId: e39cae3490ef0f0f151842f428a45d14d2c4d9ed
2025-09-30 10:30:37 +00:00
Aleksandr.Govenko
acba8a231a
PY-83348 Narrow X | None object to X after object or x
...
GitOrigin-RevId: d835132ade43a3f12b78f4029f584cad97180dc2
2025-09-30 10:30:37 +00:00
Aleksandr.Govenko
9bbd8452a0
PY-83047 False positive "This code is unreachable" after attribute assignment to None under an if
...
Merge-request: IJ-MR-173356
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
GitOrigin-RevId: 08669d49a831548c354096fbb5cbec1a155da4e2
2025-09-30 07:37:59 +00:00
evgeny.bovykin
61b55f5a71
PY-84289 Compute getStringBasedType with doPreventingRecursion to avoid repeating calculations
...
GitOrigin-RevId: a548f05bea971f6b3e3acdb1f1bc7898d3411d5e
2025-09-29 13:38:19 +00:00
Ilia Kirianovskii
f43aa95086
[bazel] Update build files (IJI-3062)
...
GitOrigin-RevId: 98a67396a48bddc3d084cc93c50ae2f2017bfe8c
2025-09-29 00:11:15 +00:00
Aleksandr.Govenko
039326217e
PY-82818 PyCharm infers None for dict.get(..., None) if dict key/value types are unknown
...
GitOrigin-RevId: d12ed4598d91f1ab4824f6e5953e275672027064
2025-09-26 19:05:33 +00:00
Vladimir.Koshelev
ba393efaa7
[python] PY-84398 get rid of embedded loading rules in PythonCore plugin, fix related issues
...
GitOrigin-RevId: 54f4bb333e0ca06a002a86c75f0bbc474863253e
2025-09-26 15:15:29 +00:00
Marcus Mews
eb3eeb0fca
PY-57582 dataclasses: field with default value preceding KW_ONLY shows false-positive warning
...
- support marker field typed with KW_ONLY
- adjust other inspection message
GitOrigin-RevId: 28f30ffcc3400bc719c63eacd76e432a547a1a9c
2025-09-26 07:22:47 +00:00
Marcus Mews
9c2d77a961
PY-84322 Code compatibility inspection doesn't warn about absent parentheses in except clauses in Python <3.14
...
- add incompatibility inspections, quickfix, tests
- improve quickfix for adding parentheses
- add AST tests for PY-84077
GitOrigin-RevId: 2d09a06d4d0b5ae106f556808900573c50f41800
2025-09-25 08:31:43 +00:00
Mikhail Golubev
7aec99a505
PY-82979 PY-81028 PY-83699 PY-83583 PY-83700 PY-81439 Bump the stub index version
...
Otherwise, the newly recognized implicit type aliases are not stored in the indexes.
GitOrigin-RevId: de504d03d72c7bc856a10f8d0900e6ff62816112
2025-09-23 10:36:30 +00:00
Petr
51ad67e9f7
PY-54512 Handle line breaks when extracting a method
...
GitOrigin-RevId: 95f6c067e613172913f3bbdc60eafb8623e32457
2025-09-18 15:42:03 +00:00
Marcus Mews
3914253777
PY-76811 Conformance test failure: dataclasses_slots.py
...
- support @dataclass(slots=True)
- add inspection for conflict with explicit __slots__
- add quickfix for new inspection
- add/adjust tests
GitOrigin-RevId: 5ac6efeb6c1e209b641365e2f22bdca74ae6484a
2025-09-18 08:08:12 +00:00
Morgan Bartholomew
c2f7a647e3
[python] PyInvalidCastInspectionTest cleanup
...
- moved functions to `PyTypeUtil`
- improved naming and documentation
- improved hitbox for unnecessary
- added tests to suites
Merge-request: IJ-MR-174646
Merged-by: Morgan Bartholomew <morgan.bartholomew@jetbrains.com >
GitOrigin-RevId: 4cecc6eb9a22cd8cc4d4019e0ff6f22faebe8cae
2025-09-17 08:15:57 +00:00