Morgan Bartholomew and intellij-monorepo-bot
5d241e05ff
misc python: get type utility methods
...
- add `getType` to `PyTypedElement`
- add `getReturnType` to `PyCallable`
(cherry picked from commit 06e35cd6e1617633f24e39936a02b6885d599b9b)
GitOrigin-RevId: 6917596e19be70904725e6c79957a3ed8462c894
2026-03-23 04:40:25 +00:00
Morgan Bartholomew and intellij-monorepo-bot
53e012bc7b
PY-78235 PyAnyType: add tests and refactor some more usages
...
GitOrigin-RevId: 9a9028d259fb33e450390653fb3984fbae43529e
2026-03-22 07:40:27 +00:00
Morgan Bartholomew and intellij-monorepo-bot
85a7b49911
PY-78235 PyAnyType: validate types
...
GitOrigin-RevId: d9552b3949bb45aee0a50e1e67f3c158fd2f01fa
2026-03-22 07:40:26 +00:00
Morgan Bartholomew and intellij-monorepo-bot
d3a3be4cd7
PY-78235 PyAnyType: option to enable
...
(cherry picked from commit 9774a8d25a879a47ffe2200cc8a68eeca138274e)
GitOrigin-RevId: 6d04596d71db1589225f7263615aafdeeebcc425
2026-03-22 07:40:26 +00:00
Morgan Bartholomew and intellij-monorepo-bot
ef15693492
PY-88447 TypeEvalContext: make the companion public
...
(cherry picked from commit 00fd75dae01bfab8e53f65d6b60bfb5265d5e7da)
GitOrigin-RevId: 07c812a513b04773bd77495eee67767efce2e7c4
2026-03-20 00:53:53 +00:00
Morgan Bartholomew and intellij-monorepo-bot
867a754295
refactor python: j2k apply fixes from review
...
- document `PyAnyType`
- remove wildcards from `PyType` methods
- revert `PyTypeUtil.notNullToRef` to a function
GitOrigin-RevId: 4ba489184c466e57b28a149fb39c9858c5070f80
2026-02-26 04:34:02 +00:00
Vitaly Legchilkin and intellij-monorepo-bot
20b5c8c972
PY-86864 Replace PyInterpreterInspection with EditorNotificationProvider
...
Replace the LocalInspectionTool-based "no interpreter" warning with an
EditorNotificationProvider banner. This extends coverage to pyproject.toml
and README.md files (in addition to .py files) and simplifies the fix
architecture.
Key changes:
- Delete PyInterpreterInspection, replace with PyInterpreterNotificationProvider
- Add PyInterpreterNotificationFileOpenedListener for split-editor timing
- Replace LocalQuickFix with a simpler InterpreterFix interface (no ProblemDescriptor)
- Simplify PyAsyncFileInspectionRunner: use refreshAfterWrite for flicker-free
cache refresh, use EditorNotifications instead of DaemonCodeAnalyzer
- Remove PyInterpreterInspectionSuppressor (no longer needed without inspection)
- Add isPythonModule check for the module
- Move bundle keys from PyPsiBundle to PyBundle with python.sdk.* prefix
- Extract CONFIGURABLE_ID constant in PyActiveSdkModuleConfigurable
IJ-MR-192977
(cherry picked from commit 6b3584d6c6beac53f4b8f0abb9a34e698b4ad03f)
GitOrigin-RevId: 1df48bbfbade2f7f31ffae7b02a0cab2f1f68389
2026-02-24 08:23:28 +00:00
Marcus Mews and intellij-monorepo-bot
bb3287b757
PY-76914 Conformance test failure: generics_variance.py
...
GitOrigin-RevId: a8685c92130b4554072e7b6b482b418c443f2d24
2026-02-16 21:55:31 +00:00
Morgan Bartholomew and intellij-monorepo-bot
c89964a84e
PY-87130 type engine: add ui
...
GitOrigin-RevId: ea1b074efb27a07ceccae85d92dda4806d4888eb
2026-02-16 20:27:54 +00:00
Morgan Bartholomew and intellij-monorepo-bot
8870cfef3f
PY-87568 python: add inspection for coroutine in boolean context
...
GitOrigin-RevId: a4225a2a8f2959947486a0bf927ff8ac388c5ccb
2026-02-16 13:18:27 +00:00
Morgan Bartholomew and intellij-monorepo-bot
a7bdd3fb88
Rename .java to .kt
...
PY-87568
GitOrigin-RevId: e7a5c976722a1255449ca3be53f7c7d69e8ad5b1
2026-02-16 13:18:27 +00:00
Morgan Bartholomew and intellij-monorepo-bot
c028889a56
PY-78235 PyAnyType
...
GitOrigin-RevId: cac1389d7f20e8054223e07a0bf3f86b7b3c5b51
2026-02-16 02:48:40 +00:00
Morgan Bartholomew and intellij-monorepo-bot
5f035ba041
Rename .java to .kt
...
PY-78235
GitOrigin-RevId: 11d800bc28fedf38e5dc06751517499c1ed00f38
2026-02-16 02:48:39 +00:00
Morgan Bartholomew and intellij-monorepo-bot
80c2c8cfd1
refactor python: j2k TypeEvalContext
...
GitOrigin-RevId: 55a9758c7689d35b96f2925931b8db8d5db0846a
2026-02-15 12:37:38 +00:00
Morgan Bartholomew and intellij-monorepo-bot
4436f7d5aa
refactor python: j2k PyType
...
GitOrigin-RevId: 8ce307bf77950477e61ab508bd69905fc156d353
2026-02-15 12:37:37 +00:00
Morgan Bartholomew and intellij-monorepo-bot
4670df9372
Rename .java to .kt
...
GitOrigin-RevId: f468106e5930ac8070ceb326042feb8e5f0d40a5
2026-02-15 12:37:37 +00:00
Andrey Vokin and intellij-monorepo-bot
5749086d96
PY-87589 Create env test for LSP server integration
...
GitOrigin-RevId: 7e815be16d6f132f355c72df081426b976ad538c
2026-02-15 12:37:20 +00:00
Morgan Bartholomew and intellij-monorepo-bot
fca8fb36c8
refactor python: j2k PyTypingTypeProvider
...
GitOrigin-RevId: 69dae1b7df9761cbc375b3da89c6fc1c934d8bb8
2026-02-14 05:11:30 +00:00
Morgan Bartholomew and intellij-monorepo-bot
a3c83080dc
refactor python: j2k TypeEvalContext
...
GitOrigin-RevId: 8e53c03c064886df0cd98f5646e1ce23a3dbdf8d
2026-02-14 05:11:30 +00:00
Morgan Bartholomew and intellij-monorepo-bot
fba91f18ea
Rename .java to .kt
...
GitOrigin-RevId: 729e98022e3210105231e9d4d72092a2ff85eee1
2026-02-14 05:11:29 +00:00
Daniil Kalinin and intellij-monorepo-bot
6e2c7614ca
PY-79067 Allow creating PyCallableType directly with PyCallableParameterVariadicType instead of wrapping it in the list of callable parameters
...
This refactoring allows simplifying and unifying logic whilst calculating substitutions for callable types and its matching in `PyTypeChecker`
GitOrigin-RevId: e61bd1f6cf19539b0a66ff2e3e47164aec0c0aa1
2026-02-12 10:45:05 +00:00
Aleksandr.Govenko and intellij-monorepo-bot
da873ac92b
PY-85990 [python]: unified logic in PyCaseClause and PyTypeAssertionEvaluator about exhaustiveness of match statement
...
Also, some small fixes here and there to ensure it works correctly
Space-RevId: 90f4b41c0eca9aae4c49841d756f7c96f805fcff
GitOrigin-RevId: 844c13869fb113df46537c4a644dbbfb8ba8c977
2026-02-03 18:14:34 +00:00
evgeny.bovykin and intellij-monorepo-bot
e62ccaf7fd
cleanup pycharm: Make LibraryTypeEvalContext and OptimizedTypeEvalContext private
...
GitOrigin-RevId: d9a9103f832e064d9d0637a835c2aa253b15f1cd
2026-02-02 20:52:59 +00:00
Morgan Bartholomew and intellij-monorepo-bot
428635056c
PY-87273 type representation: use Ref<PyType?>?
...
GitOrigin-RevId: fa2009fe63f9ce80a3fcb6b71746761f51d851db
2026-02-01 11:27:33 +00:00
Leonid Shalupov and intellij-monorepo-bot
188b7ef96f
IJI-3282 Optimize imports
...
GitOrigin-RevId: 3b5c00d8ff20b8d0bb6005bc450921085d2da9b2
2026-01-31 17:03:42 +00:00
Mikhail Golubev and intellij-monorepo-bot
891b7efcee
PY-87114 Introduce experimental IntentionalUnstubbing API and mark some known violators
...
Space-RevId: 11b07ff053361d3c3cd1a671ac9b8afc36648696
GitOrigin-RevId: 0bfae59af1b5782bbbaf13915097d80dcfcc92b0
2026-01-30 11:06:16 +00:00
evgeny.bovykin and intellij-monorepo-bot
d7b180e15d
PY-86219 Use weak keys for TypeEvalContext caches by default
...
Space-RevId: 5bd8593af2f394e5dffaf8d120aad81c1735ed22
GitOrigin-RevId: e61a25688688e216eeddfd0e2212a6a9796cf2f7
2026-01-22 15:36:41 +00:00
Nikita.Ashihmin and intellij-monorepo-bot
8b08460c9c
[python] PY-86493 LSP: Fix support of Pyrefly type provider
...
GitOrigin-RevId: ed686031e3fe8f2b9c9f226906ddff876303aaf3
2026-01-16 11:30:39 +00:00
Trinh Anh Ngoc and intellij-monorepo-bot
438edeef5b
PY-86301 java.lang.IllegalArgumentException in TypeEvalContext in PyCharm 2025.3.0
...
GitOrigin-RevId: ff33ed66c8333e91ae6fea39dd8552ee950df60b
2026-01-13 19:02:30 +00:00
Vladimir.Koshelev and intellij-monorepo-bot
6bc5351f5d
python PY-86493 use fallback context for converting string type to PyType
...
Merge-request: IJ-MR-187710
Merged-by: Vladimir Koshelev <Vladimir.Koshelev@jetbrains.com >
GitOrigin-RevId: a842dfafd93404181542c9f5e83c9f30ed589a84
2026-01-13 14:15:59 +00:00
Nikita.Ashikhmin and intellij-monorepo-bot
337d4ae9d2
[python] PY-86493 Pyrefly: Support type resolver"
...
GitOrigin-RevId: 165075c65ada000f2d3c5cdfb0d6203eb5373019
2026-01-12 17:08:02 +00:00
Andrey Vokin and intellij-monorepo-bot
7ece4eb12a
Revert "PY-86493 use only one external type provider"
...
This reverts commit 2aef8be41cf65845932093ff52d33031fbf170bb.
GitOrigin-RevId: a9eb3a68b395ee78c40410399bc37b30fc69eebd
2026-01-12 17:08:02 +00:00
Andrey Vokin and intellij-monorepo-bot
4d20e85abc
Revert "PY-86493 support pyrefly as a type provider"
...
This reverts commit 81b44ede0d3602340fb99deb0013f29befcf92b8.
GitOrigin-RevId: 91646b30a48738f2a119e0de80a1e1fc510438d2
2026-01-12 17:08:02 +00:00
Andrey Vokin and intellij-monorepo-bot
c6ecb30532
Revert "PY-86493 Avoid using an external type provider to resolve the type when the type hint itself originated from an external type provider."
...
This reverts commit 27ae660342d8322dbbd92d0fd98d14cb9ac90ee7.
GitOrigin-RevId: 92ae43b4212b140057435290a8234d8519c9a9ff
2026-01-12 17:08:02 +00:00
Andrey Vokin and intellij-monorepo-bot
51a2b019d0
Revert "PY-86493 extract common support for pyrefly and ty to LspTypeEvalExternalTypeProvider"
...
This reverts commit d115d18511f697856f40305a37aa0b3de6763329.
GitOrigin-RevId: 1ef6605ea7c301abf5d758f75fbf5bb146deaa47
2026-01-12 17:08:02 +00:00
Andrey Vokin and intellij-monorepo-bot
f29c7f4070
Revert "PY-86493 use only one external type provider"
...
This reverts commit c7cdf1fe1d0d3d7f65d74e7a169c88a29184520d.
GitOrigin-RevId: b254ec6bdef76351ff020b984e4c608b31a8233b
2026-01-12 17:08:02 +00:00
Andrey Vokin and intellij-monorepo-bot
0cb218f2d3
Revert "PY-86493 do not send primitive types to the lsp engine"
...
This reverts commit 15a526455064e6e860e2a2009d3f4727021deec1.
GitOrigin-RevId: b9ea4ef713b482ae0c348eefc73f8fdca7cd7c65
2026-01-12 17:08:02 +00:00
Andrey Vokin and intellij-monorepo-bot
09718a1e14
Revert "PY-86493 get types only from external type provider if it's enabled"
...
This reverts commit 6715f96668d42711b24d0f36d57eb00de7da37fb.
GitOrigin-RevId: f41f8e73ccbb5bf1ad8fe6f58f22183d33bd1860
2026-01-12 17:08:02 +00:00
Andrey Vokin and intellij-monorepo-bot
a8b30f939b
PY-86493 get types only from external type provider if it's enabled
...
GitOrigin-RevId: 6715f96668d42711b24d0f36d57eb00de7da37fb
2026-01-08 03:25:21 +00:00
Mikhail Golubev and intellij-monorepo-bot
7c166c07f7
PY-85654 Unify getName() for PyCallableTypeImpl and PyFunctionTypeImpl
...
by lifting the implementation to PyFunctionType, so that `getName()`
for PyFunctionType no longer returns just "function".
GitOrigin-RevId: 66b64237c6dd443c5c7792c23437b8a12b79e699
2026-01-06 13:11:18 +00:00
evgeny.bovykin and intellij-monorepo-bot
050e6f7307
cleanup pycharm: Fix NPE in inspectProtocolSubclass
...
GitOrigin-RevId: 1f52c7e45d9a455e7e2ac400e27b5374408c8d0d
2026-01-06 09:16:29 +00:00
Andrey Vokin and intellij-monorepo-bot
19f6212313
PY-86493 do not send primitive types to the lsp engine
...
GitOrigin-RevId: 15a526455064e6e860e2a2009d3f4727021deec1
2025-12-25 14:03:43 +00:00
Andrey Vokin and intellij-monorepo-bot
a639d540a2
PY-86493 use only one external type provider
...
GitOrigin-RevId: c7cdf1fe1d0d3d7f65d74e7a169c88a29184520d
2025-12-25 14:03:43 +00:00
Andrey Vokin and intellij-monorepo-bot
a6df6e9d1b
PY-86493 extract common support for pyrefly and ty to LspTypeEvalExternalTypeProvider
...
GitOrigin-RevId: d115d18511f697856f40305a37aa0b3de6763329
2025-12-25 14:03:43 +00:00
Andrey Vokin and intellij-monorepo-bot
717831ba3c
PY-86493 Avoid using an external type provider to resolve the type when the type hint itself originated from an external type provider.
...
GitOrigin-RevId: 27ae660342d8322dbbd92d0fd98d14cb9ac90ee7
2025-12-25 14:03:43 +00:00
Andrey Vokin and intellij-monorepo-bot
b1c85798c8
PY-86493 support pyrefly as a type provider
...
GitOrigin-RevId: 81b44ede0d3602340fb99deb0013f29befcf92b8
2025-12-25 14:03:42 +00:00
Andrey Vokin and intellij-monorepo-bot
7934b877dd
PY-86493 use only one external type provider
...
GitOrigin-RevId: 2aef8be41cf65845932093ff52d33031fbf170bb
2025-12-25 14:03:42 +00:00
Andrey Vokin and intellij-monorepo-bot
4bf819f89f
Revert "[python] PY-86493 Pyrefly: Support type resolver"
...
This reverts commit 890c86d623905493063823b4bc03b6153069e0c1.
GitOrigin-RevId: aa943156ae095da9a9c87f8dfce960596981f183
2025-12-25 11:12:00 +00:00
Nikita Ashihmin and intellij-monorepo-bot
c220374f68
[python] PY-86493 Pyrefly: Support type resolver
...
Merge-request: IJ-MR-186102
Merged-by: Nikita Ashihmin <Nikita.Ashihmin@jetbrains.com >
Key features:
- Added Wrapper PSI elements that are not sent to Pyrefly for type calculation because they simply use the type of another element.
- Added more instant type annotations for types that do not require context for type calculation.
- Supported Pyrefly LSP type inference. To use it, the following fork is required: https://github.com/nashikhmin/pyrefly
- Added a separate context because built-in constraints are not applicable to Pyrefly.
- The first ten types are calculated one-by-one to ensure quick responses for completion; however, subsequent types are calculated in batches for better time efficiency.
GitOrigin-RevId: 890c86d623905493063823b4bc03b6153069e0c1
2025-12-23 19:00:25 +00:00
Aleksandr.Govenko and intellij-monorepo-bot
764fbaf1ef
PY-49165 PY-86123 PY-86124 Improve after review
...
GitOrigin-RevId: 581c80229ca4f9e3a1faab057d0a3c689e2ce96e
2025-12-22 22:36:14 +00:00