evgeny.bovykin
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
evgeny.bovykin
133bfdf47a
PY-84859 Implement type inference for decorated definitions without expression fragments
...
GitOrigin-RevId: 28acd74cbf66bf997ef4436006d4d0f870794d4a
2025-12-05 16:28:36 +00:00
Petr
86830410ab
cleanup [python]: Move PyVersionCheck methods to PyVersionSpecificStubBase.kt
...
GitOrigin-RevId: d839a0bf12d05a21bba1c8eb97b0b5f423a669db
2025-11-29 02:34:46 +00:00
Petr
1375df492b
PY-50642 Take into account statically evaluated if-conditions when resolving class members
...
GitOrigin-RevId: 70c3951143549d682643f83e0e8665f03f261e6a
2025-11-28 19:07:18 +00:00
Petr
90fac13e8c
PY-50642 Use a more generic name for PyVersionAwareElementVisitor so it can be used with arbitrary if-conditions
...
GitOrigin-RevId: 55f6afe70f9b8ed0a2170c7279b5a57252ce865f
2025-11-28 19:07:18 +00:00
Mikhail Golubev
88840ab22b
PY-76886, PY-76860 Make PyClassType.toInstance/toClass return PyClassType, not PyClassLikeType
...
GitOrigin-RevId: 30451801cd9dc2c840313699da6a596937bf9bd0
2025-11-28 12:42:07 +00:00
evgeny.bovykin
17fb6c8e49
[python] cleanup Make TypeEvalContext.myExternalEvaluated protected to be inline with the rest of its fields
...
GitOrigin-RevId: 7a1af8830df0a317441f868ccd1ba79809d28f52
2025-11-27 17:08:37 +00:00
Mikhail Golubev
cd0e487f6c
[python] refactoring: Avoid returning nulls from getArguments()
...
GitOrigin-RevId: 8dac4c1d5e1a258eb4c985700f4171b91e451a79
2025-11-25 18:58:25 +00:00
Morgan Bartholomew
a8357653da
[python] PY-28130 infer lambda parameter type from expected type
...
GitOrigin-RevId: 15e316d89a7771759e043c1d60865144b3c910d7
2025-11-21 03:37:14 +00:00
evgeny.bovykin
d7e26c8bc1
PY-85271 Reformat files with incorrect formatting
...
GitOrigin-RevId: 6c8ee5d2ca5f5807c6534e8a97843d16371562d8
2025-11-13 16:49:09 +00:00
evgeny.bovykin
e9d027ed7c
[python] Handle property getter potentially being null
...
GitOrigin-RevId: 77c7849f47f63b99114c5296a2f79885ac7610b9
2025-11-11 18:46:43 +00:00
Morgan Bartholomew
e5aec74d8c
[python] PY-83505 ExternalTypeProvider extension point
...
GitOrigin-RevId: 4c576007a0f84542f5b91f5e502d0e280c3d5b7c
2025-10-30 09:00:10 +00:00
Morgan Bartholomew
7e25ddaa9b
[internal] IJPL-215577 add kotlin-annotations-jvm as a dependency
...
GitOrigin-RevId: ecedf94905a79996265f78f888c850c9f92d4368
2025-10-30 06:32:23 +00:00
evgeny.bovykin
53f9f2ef04
PY-84972 Fix NPE in PyInvalidCastInspection
...
Mark PyWithAncestors.getAncestorTypes return type as @Nullable
GitOrigin-RevId: fb7cbbebfac371b21456711087f82fbdaf21673c
2025-10-21 22:10:45 +00:00
evgeny.bovykin
f9b4104d74
PY-84469 Consider ClassVar when matching protocol and a concrete class
...
GitOrigin-RevId: 76af969cfe9318049f02dc7f6bdd03fe20a9504f
2025-10-21 09:52:41 +00:00
evgeny.bovykin
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.bovykin
2123dbfa15
Enable TypeEvalContext#assumeType only if python.use.better.control.flow.type.inference is enabled
...
GitOrigin-RevId: da7e3452bfbdbfd618dbe166e5a6c199f28cae6f
2025-10-15 00:30:08 +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
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
Ilia Kirianovskii
f43aa95086
[bazel] Update build files (IJI-3062)
...
GitOrigin-RevId: 98a67396a48bddc3d084cc93c50ae2f2017bfe8c
2025-09-29 00:11:15 +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
Petr
593ffc8edb
PY-84356 Fix TypeEvalContext.inOrigin()
...
GitOrigin-RevId: f7d40505057b883cf87d96a481129c4347060c0b
2025-09-22 19:18:56 +00:00
Petr
fdade3b615
PY-84356 Group related TypeEvalContext methods together
...
GitOrigin-RevId: 3eadd8c1322b8ff7a3fb145c39f8fdf8f8d8c19c
2025-09-22 19:18:56 +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
Yuriy Artamonov
2cf790a9d6
[python] PY-84203 Reuse PythonParserIcons.PythonFile icon everywhere
...
GitOrigin-RevId: c485c76e41659f33bd8d86de2470b27be684411d
2025-09-14 23:47:27 +00:00
Aleksandr.Govenko
e9d4a103a0
PY-83900 Inspect Code consumes 100% CPU and takes unusually long on specific simple file
...
GitOrigin-RevId: 81973d162072c94b4d7201dffc68d43669f449a3
2025-09-08 13:48:34 +00:00
Petr
b3249cfdb5
PY-70247 Disallow stub to AST switch for pyi files
...
GitOrigin-RevId: 8c84d83dcffc4aaf64c0e7bc719de2fdbe7629af
2025-08-29 13:42:59 +00:00
Ilia Kirianovskii
dc268560b6
[bazel] Update build files (IJI-2835)
...
GitOrigin-RevId: 275260ab73f59d3c08f0b4cb9f4c89b74054094a
2025-08-20 08:49:22 +00:00
Petr
dd58eaacfc
[python] Rm obsolete registry key python.use.better.control.flow.type.inference
...
GitOrigin-RevId: 47ca59e692de12376ca17604b8b9ab2439882a45
2025-08-19 17:37:04 +00:00
Mikhail Golubev
cb4a20178c
[python] Fix parameter names of PyElementGenerator.createBinaryExpression
...
GitOrigin-RevId: 7620ab27f1cac4dc386fecdd4a6c5d63a8f341ce
2025-08-15 16:26:28 +00:00
Marcus Mews
054331c2a3
PY-83059 NullPointerException in PyCharm 2025.2
...
- add null check
GitOrigin-RevId: 25ea1637981dec0d5d4fae532bed9e6c0ce7ebe6
2025-08-06 09:25:42 +00:00
Vladimir.Koshelev
03c367e414
[PY-75831] library cache should work correctly for PsiFiles created specially for completion.
...
GitOrigin-RevId: 4ed0ca563aad0f750901f0d6c8ca73f7ee223b8b
2025-08-01 17:44:22 +00:00
Vladimir.Koshelev
447a7d0891
[PY-82607] introduce a caching for all computations in PyTypingTypeProvider
...
GitOrigin-RevId: ad795a4fc2bed8dc7f5276eb18c80a51485dcabf
2025-08-01 17:44:21 +00:00
Andrey Vokin
59bec2a22b
PY-75831 Split cache(resolve/type) into library and user part
...
(cherry picked from commit 1147ca940dff1fa6dfbeaadcccd7e2487dda842a)
IJ-MR-169158
GitOrigin-RevId: e397e43f5ae5d795ab524e9427be7bbb0d924298
2025-07-28 08:06:50 +00:00
Mikhail Golubev
fd4360b032
PY-75831 tests for split cache(resolve/type) into library and user part
...
(cherry picked from commit ca5f003693960b25d78bda050b55fe39900be5a7)
IJ-MR-169158
GitOrigin-RevId: 759cb38f76124b5b0709757e8f73ddffbf4a8248
2025-07-28 08:06:50 +00:00
Andrey Vokin
31991b70bd
PY-75831 Split cache(resolve/type) into library and user part
...
(cherry picked from commit 94456d3a1f0be2e747641b74ce8246857b1a3f77)
IJ-MR-169158
GitOrigin-RevId: 4cdf0b90f601ca37b0f11b4392dbcfcf856472c6
2025-07-28 08:06:50 +00:00
Petr
43024c4c88
PY-81981 Deprecate PyPsiFacade#getLanguageLevel
...
GitOrigin-RevId: edb0ec18aaaa55032e9e5b8f9ff713f07e22da04
2025-07-22 19:28:39 +00:00
Aleksandr.Govenko
6a35fa7cc1
[python] Convert PySequencePattern and PyMappingPattern to kotlin
...
GitOrigin-RevId: 074ed9f865556d561237fc894d202d76995ab562
2025-07-15 18:59:48 +00:00
Aleksandr.Govenko
3332759510
[python] Refactor PyCapturePatternImpl. Introduce PyCaptureContext
...
GitOrigin-RevId: 2e3fbf4c7d79e6031c7c087e5c7e7e49046587fd
2025-07-15 18:59:48 +00:00
Aleksandr.Govenko
c4256d689d
Rename .java to .kt
...
GitOrigin-RevId: de4536d7ce72661c150a019631734c7489af6a84
2025-07-15 18:59:48 +00:00
Mikhail Golubev
064419d1e9
[python] Make overlooked PyElementVisitor methods for statements delegate to visitPyStatement
...
GitOrigin-RevId: f6853d0dfc5ddcc7b40bfccead0ad779328fc751
2025-07-04 13:15:14 +00:00
evgeny.bovykin
abe6184e8a
PY-79816 Introduce PyType#getMemberTypes and use it to infer __hash__ type of dataclasses
...
`getMemberTypes` should be used for members which have no PSI which can be used to resolve to. For example, `__init__` method in dataclasses are sometimes not present in the source code. Yet its parameters are always useful for the code analysis. In this case, `getMemberTypes` should be used.
GitOrigin-RevId: 2455ed05099842fc50e1fa2a196c4952b6444795
2025-07-02 08:33:56 +00:00
Petr
7135789b0f
PY-81288 Incorrect type inferred for a function with positional only parameters
...
GitOrigin-RevId: 3bfea7064073b32743d58bbf5030769d1565a61e
2025-06-28 13:01:14 +00:00
Petr
685695021f
PY-81471 Move lang.foldingBuilder to common
...
GitOrigin-RevId: 3c4f9cc773d14492e9fbf026f0472a908c9262ec
2025-06-18 20:02:26 +00:00
Andrey Vokin
dc83319152
PY-81269 Extremely High RAM Usage
...
GitOrigin-RevId: bb534d62931c176d2395e2cceb0afabc57464669
2025-06-18 13:17:14 +00:00
Petr
e33aae05fc
PY-81471 Move PyStatementMover to python.syntax
...
GitOrigin-RevId: c9cb03c1bb97720c392ea482765790674f27b647
2025-06-13 20:21:11 +00:00
Daniil Kalinin
90473326ac
PY-76814 Add variance field to PyTypeVarType
...
GitOrigin-RevId: 2e7fe0b149a7412c4fdae924a846f200e82786a0
2025-06-04 12:17:47 +00:00
Aleksandr.Govenko
97cf7227da
PY-78119 Introduce PyNeverType
...
PyNeverType is no longer child of PyUnionType, it was confusing.
Fixed failing conformance tests
GitOrigin-RevId: d05a425fa02e1647b82017a74b669fa3e1518354
2025-06-03 15:07:07 +00:00
Aleksandr.Govenko
b54f5b4ae8
PY-53880 Incorrect exhaustive pattern matching of Enum or Union types
...
Add PyNeverType and integrate it in PyTypeAssertionEvaluator
GitOrigin-RevId: 3db5224bfbf559f6d1bb146fd72c6cc6a97c4598
2025-05-30 18:33:26 +00:00
Morgan Bartholomew
4b1d24562a
[python] PY-80436 support ellipsis
...
GitOrigin-RevId: 82e38fcb502ed68d5676f2cc774ef2653d69febb
2025-05-29 01:00:27 +00:00