436 Commits
Author SHA1 Message Date
Morgan Bartholomewandintellij-monorepo-bot cbe872c85a PY-87998 PyStringConversionWithoutDunderMethodInspection: initial
(cherry picked from commit 359b9a41515da9a841aad787695dee4ed14a12f5)

GitOrigin-RevId: 76a2706e3175e2cd8768b2c7882c3506120a82cb
2026-03-24 04:40:40 +00:00
Morgan Bartholomewandintellij-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
Tatiana Berandintellij-monorepo-bot d99b42eef2 PY-87796 UI Texts: Fix typos and grammar mistakes (Feb 2026)
(cherry picked from commit 8996fec06c52cda4d28cd5176ba1d97a7036639b)

GitOrigin-RevId: 3bc91b31ef8ecea7cd57b67c7298ed815f9a9116
2026-02-25 17:03:10 +00:00
Vitaly Legchilkinandintellij-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
Tatiana Berandintellij-monorepo-bot 2bf9d316a5 PY-87796 UI Texts: Fix typos and grammar mistakes (Feb 2026)
(cherry picked from commit f4b52fc04911cc80b05fc155485fa5aafcd70bf4)

GitOrigin-RevId: 76b3859ef35485c1704d9d12419fae927a3989c6
2026-02-20 23:47:12 +00:00
Alexey Katsmanandintellij-monorepo-bot fc0731b0ef PY-87227 Suggest a tool installation if it is not already installed
Support a mechanism for recommending a tool installation if we're
confident it should be used for SDK configuration. For now, it only
supports uv (with uv.lock check).

It also fixes PY-87744, since we dropped all usages of PyDetectedSdk in
our SDK configurators.

GitOrigin-RevId: f99a1089025079313db9aae09e3cfc0205e7e37f
2026-02-20 22:53:20 +00:00
Morgan Bartholomewandintellij-monorepo-bot 68037d2f98 PY-80351 PyNoneFunctionAssignmentInspection: review feedback
(cherry picked from commit 1028edb99d96676e17a439e07f56a331bf5d907b)

IJ-MR-192558

GitOrigin-RevId: 43bfdb87df46803bf78b93c5345ad4b7a7e323db
2026-02-20 11:46:29 +00:00
Tatiana Berandintellij-monorepo-bot c2fa158f85 PY-87554 Wrong quick fix name for inheriting abc.ABC
(cherry picked from commit b3aa8b56a2d537250826503a208250e063ac72b3)

GitOrigin-RevId: 395ea843424a30b701e1317a8ead5840f53a1e5d
2026-02-20 00:16:08 +00:00
Marcus Mewsandintellij-monorepo-bot bb3287b757 PY-76914 Conformance test failure: generics_variance.py
GitOrigin-RevId: a8685c92130b4554072e7b6b482b418c443f2d24
2026-02-16 21:55:31 +00:00
Morgan Bartholomewandintellij-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 Bartholomewandintellij-monorepo-bot 5b3a9228b9 PY-80351 PyNoneFunctionAssignmentInspection: report on all usages
GitOrigin-RevId: 02c41a77c0ed8795eb7052bdd0a04192d1fc00a8
2026-02-16 08:14:49 +00:00
Nikita Paniukhinandintellij-monorepo-bot 9331cae59f [python] PY-76868 Upgrade subscription type form checks
Merge-request: IJ-MR-190288
Merged-by: Nikita Paniukhin <nikita.paniukhin@jetbrains.com>

GitOrigin-RevId: e484c7e6249797b66145149eac58b7c6945758b4
2026-02-15 22:44:20 +00:00
Vladimir.Koshelevandintellij-monorepo-bot 8762304f24 PY-87020 [python]: use PSI resolution for framework detection
GitOrigin-RevId: c85f2ac367c38f70ebc5d6cfcf79d94517819d0a
2026-01-30 21:49:04 +00:00
evgeny.bovykinandintellij-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
Bas Leijdekkersandintellij-monorepo-bot 3dd68dd96c IJPL-228499 [platform, inlays]: Inlay hint name should have Sentence capitalization in Nls annotation
Not fixed for Ruby because that requires mandatory review

GitOrigin-RevId: 079e572ff488dec1f14db216a687cd8b1d8b7b93
2026-01-16 13:57:13 +00:00
Morgan Bartholomewandintellij-monorepo-bot bc0940e05d PY-84033 type engine: callable representation parsing
GitOrigin-RevId: c2926c5d507c2380af394593785297d0a5ddad18
2026-01-14 17:37:57 +00:00
Andrei.Kuznetsovandintellij-monorepo-bot 89314060c4 IJPL-227045 IJ-MR-187307 add "open=true" to services that have overrides
GitOrigin-RevId: f9795dcc08ef0f29ba20443e13a6ead6eade6d98
2026-01-12 13:56:43 +00:00
Aleksandr.Govenkoandintellij-monorepo-bot f2b7fcd315 PY-86019 [python]: show error when class pattern uses non-class type
GitOrigin-RevId: 1e0d0926155459d3112bf921967a822073f327f8
2026-01-08 18:07:12 +00:00
Aleksandr.Govenkoandintellij-monorepo-bot 764fbaf1ef PY-49165 PY-86123 PY-86124 Improve after review
GitOrigin-RevId: 581c80229ca4f9e3a1faab057d0a3c689e2ce96e
2025-12-22 22:36:14 +00:00
Aleksandr.Govenkoandintellij-monorepo-bot 1c34e08d66 PY-86123 Add inlay hints for positional patterns in a match/case statement
GitOrigin-RevId: bba519b0ed7b2529f719ae1aaaf23e893761c90e
2025-12-22 22:36:14 +00:00
Aleksandr.Govenkoandintellij-monorepo-bot 152f63401c PY-49165 Add tests for PyPatternInspection and related quickfixes
GitOrigin-RevId: 0e35bd5d50e2d6b544cbd4467d184b6be21b7574
2025-12-22 22:36:14 +00:00
Aleksandr.Govenkoandintellij-monorepo-bot 6fd9133f29 PY-49165 Add references from __match_args__ to respective members
GitOrigin-RevId: 026a284e9cce777000958996aa70b5ff8826843b
2025-12-22 22:36:13 +00:00
Aleksandr.Govenkoandintellij-monorepo-bot 02990fbff8 PY-49165 Pattern Matching quick fix to add __match_args__
- Added PyPatternInspection class with logic to highlight and fix issues in pattern matching
- Modified PyAstAsPattern.getTarget() to return nullable value
- Added quick fix for PyAsPattern to simplify patterns
- Added quick fix for PyClass to add `__match_args__` attribute based on `__init__` signature
- Added PyRemoveElementFix quick fix to clean invalid list elements
- Added validation in PyPatternInspection to detect excessive positional patterns
- Added conflict detection between positional and named patterns in PyPatternInspection

GitOrigin-RevId: 64a1693aae2d243b83c46883a5d8476e727562a8
2025-12-22 22:36:13 +00:00
Petrandintellij-monorepo-bot eb116ceb78 PY-76859 Report a warning if annotation for the self parameter of __init__ method contains class type variables
GitOrigin-RevId: 5ad374adfedaf426b32ddbd6facd077a506c9248
2025-12-10 18:17:49 +00:00
Artem Ivanovandintellij-monorepo-bot 2ba79a9f54 PY-84606 Add inspection for unhashable dict keys and set elements
GitOrigin-RevId: 46ee338cc984b4278bbec19fb47ed7185764e3fa
2025-12-09 22:14:08 +00:00
evgeny.bovykinandintellij-monorepo-bot 6a772de5d5 PY-85638 PY-85893 Use soft-key soft-value map for TypeEvalContext caches
This prevents the caches from blowing up in size when analyzing a lot of files in a row

The most obvious example is running `Analyze code` on the whole project. Previously, all PSI elements from all files would pollute the cache, potentially consuming multiple Gb of memory. See PyDjangoSourcesPerformanceTest as an example. It used to require 16 Gb of heap, and it would still sometimes fail with OOM. Now, it runs smoothly with 2Gb of heap

GitOrigin-RevId: f9854f8abdd7086414df8f610b0f2d611ca0d455
2025-12-09 17:41:26 +00:00
Nikita Paniukhinandintellij-monorepo-bot 082324404d [python] PY-82654 Format descriptions of Python inspections
GitOrigin-RevId: fa706b67efd8d3caafc15fa101514dd7cf1721b1
2025-12-04 14:02:23 +00:00
Nikita Paniukhinandintellij-monorepo-bot 788e8300e4 [python] PY-85601 Add "invalid escape sequence" inspection
GitOrigin-RevId: d750f06efc5e42678073de084ecb2976acedd4b9
2025-12-02 21:55:58 +00:00
Daniil Kalininandintellij-monorepo-bot 2efa7df328 PY-76832 Add missing inspection reports for Self type support
Remove `generics_self_usage.py` from the ignored tests as it passes now

GitOrigin-RevId: 0761d2c161ca00768be967b65639d806dfa4bac4
2025-11-28 12:42:06 +00:00
Ilia Zakoulovandintellij-monorepo-bot 9a7f2179d9 PY-83395: Reuse context for resolving source roots
GitOrigin-RevId: 0e8111679f8fd385fb11daf3d9ad7c1ed893bb60
2025-11-26 18:31:25 +00:00
Ilia Zakoulovandintellij-monorepo-bot d26001dea9 PY-83395: Display a notification that will allow to revert marking directory as source root
GitOrigin-RevId: 295c25fca066163fe449742e174ec8a052f8992b
2025-11-26 18:31:24 +00:00
Ilia Zakoulovandintellij-monorepo-bot 9b18abc71e PY-83395: Suggest adding source root if the red import will be resolved after that
GitOrigin-RevId: dd4d94298e8c553d4ae5303e93f7f29ef5d5ae5a
2025-11-26 18:31:24 +00:00
Alexey Katsmanandintellij-monorepo-bot ab0b2158ed 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.

GitOrigin-RevId: 6a64101c5b4e5c36841f0d7c046c5fce1c5fd50b
2025-11-25 16:27:23 +00:00
Azim Akhmadjonovandintellij-monorepo-bot 7132502b38 PY-76878 Conformance test failure: typeddicts_readonly_inheritance.
GitOrigin-RevId: 1a4580f15e2135a324c6f32b77f68f8682faab89
2025-11-23 14:29:02 +00:00
evgeny.bovykinandintellij-monorepo-bot d7e26c8bc1 PY-85271 Reformat files with incorrect formatting
GitOrigin-RevId: 6c8ee5d2ca5f5807c6534e8a97843d16371562d8
2025-11-13 16:49:09 +00:00
Mikhail Golubevandintellij-monorepo-bot 7d44617dcd PY-85270 [python] Merge PyModulePackageCompletionContributor into PyClassNameCompletionContributor
Remove the now unused base class PyImportableNameCompletionContributor.

GitOrigin-RevId: 1887fb5bf35bfbc7cdd82bc31e39b0ed17e3ff35
2025-11-11 17:27:35 +00:00
vladimir.shtarevandintellij-monorepo-bot 94e6752f0b QD-12805 Updating the inspections categories
GitOrigin-RevId: 9c7642d3f3de61ee556752daed77015923da9cc8
2025-10-31 13:41:49 +00:00
evgeny.bovykinandintellij-monorepo-bot bcf0ff8249 PY-63802 Implement PyChangeLocalityDetector to fix disappearing highlighting when changing whitespace at the top level
By default, when only changing whitespace at the top level, DefaultChangeLocalityDetector would trigger and say that only the changed whitespace should be rehighlighted. However, highlighting for a whole file would still be dropped. After that, PyUnusedLocalInspection would not be triggered for any function in that file, meaning it would not re-highlight them, leading to an inspection warning disappearing.

Now, PyChangeLocalityDetector triggers when changing a whitespace on a top level and triggers re-highlighting of the whole file

Performance consideration: re-highlighting the whole file might be expensive (that's why ChangeLocalityDetector was introduced in the first place). However, no other ChangeLocalityDetector is implemented for Python, so most of the time the whole file is re-highlighted anyways. Re-highlighting the whole file in a new niche case of changing whitespace at the end of the file shouldn't lead to any significant performance impact.

GitOrigin-RevId: 8f26c59da8501f8eac78d1280888dd49ffef28d4
2025-10-28 19:14:41 +00:00
Daniil Kalininandintellij-monorepo-bot 6bfbd40f78 PY-85080 Add quick-fix to remove unused Type Parameters
GitOrigin-RevId: cbb9b8136d07350075a9af8b4bc5aaa8891edd73
2025-10-23 22:48:43 +00:00
evgeny.bovykinandintellij-monorepo-bot f9b4104d74 PY-84469 Consider ClassVar when matching protocol and a concrete class
GitOrigin-RevId: 76af969cfe9318049f02dc7f6bdd03fe20a9504f
2025-10-21 09:52:41 +00:00
evgeny.bovykinandintellij-monorepo-bot 044c140516 PY-84464 Support @property decorator when matching a protocol and its implementation
GitOrigin-RevId: fcbeeb57323336c7d921edad373ea595ef687d6b
2025-10-21 09:52:41 +00:00
evgeny.bovykinandintellij-monorepo-bot 14a4c86625 PY-84538 Report protocol instantiation as an error
GitOrigin-RevId: ad941a5d9a5fb852b0c28cbf259fdcc5ce3f3efb
2025-10-16 20:27:07 +00:00
Morgan Bartholomewandintellij-monorepo-bot c2a3f6516e [python] PY-83733 ruff support
GitOrigin-RevId: df443269c3a29cfe9b5f3b67663a1f998396e738
2025-10-15 03:19:48 +00:00
Morgan Bartholomewandintellij-monorepo-bot 4f08c28e9d [python] python-lsp-core
GitOrigin-RevId: e07d457d959a1b589861180c1be06b995218aa2c
2025-10-15 03:19:47 +00:00
evgeny.bovykinandintellij-monorepo-bot 52ec309c76 Introduce python.use.better.control.flow.type.inference again
GitOrigin-RevId: a96eb77a54bf0df442ab9a2044f5bcc517007084
2025-10-15 00:30:08 +00:00
Vitaly Legchilkinandintellij-monorepo-bot 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
Nikolay Chashnikovandintellij-monorepo-bot 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.Koshelevandintellij-monorepo-bot 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 Mewsandintellij-monorepo-bot 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 Mewsandintellij-monorepo-bot 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