Commit Graph

67 Commits

Author SHA1 Message Date
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
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
Ilia Kirianovskii
f43aa95086 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 98a67396a48bddc3d084cc93c50ae2f2017bfe8c
2025-09-29 00:11:15 +00:00
Petr
9198c0fb92 PY-70247 Cache the stub-based computation of ScopeUtilCore.getScopeOwner()
GitOrigin-RevId: 5eca49ca75c7bb6b1bccd2dc3a7d4cd5f3009725
2025-09-05 16:36:41 +00:00
Petr
da991ac9d4 PY-70247 Cache frequently accessed properties (PyImportElement, PyFromImportStatement)
GitOrigin-RevId: 473f1ed0ef0c8c0ef2b41b39bc8511ab6ffae73c
2025-09-05 16:36:41 +00:00
Mikhail Golubev
3c4e65e33f [python] Simplify PyUtil.isTopLevel: ScopeUtilCore.getScopeOwner is already aware of PSI stubs
GitOrigin-RevId: e40715bc9f642a8937a386e34cbda8d2797003fb
2025-09-05 13:12:34 +00:00
Petr
51b885b0c1 [python] Implement PyAstImportElement.getName() (PyFrontendElementTypesFacadeImpl.kt)
GitOrigin-RevId: d545552a045b8f196c31d0ff163e9f9e63a81d9a
2025-08-26 16:18:27 +00:00
Ilia Kirianovskii
dc268560b6 [bazel] Update build files (IJI-2835)
GitOrigin-RevId: 275260ab73f59d3c08f0b4cb9f4c89b74054094a
2025-08-20 08:49:22 +00:00
Aleksandr.Govenko
3c779ecab0 [python] Fix NPE in PyAstAsPattern
GitOrigin-RevId: d8f319769d8fd25c27e6ab75b05d94d56a9751b9
2025-07-23 14:23:42 +00:00
Aleksandr.Govenko
0db0ff608c PY-81676 Don't report lines with assert_never as unreachable
GitOrigin-RevId: afdbf35915823de02a6b8551f57770113d0feb2f
2025-07-23 14:23:42 +00:00
Aleksandr.Govenko
28bbc4e93f Rename .java to .kt
PY-81676

GitOrigin-RevId: ed0da39e7afbb15a593c68b319682fa618b0ed4f
2025-07-23 14:23:42 +00:00
Petr
1399a0c594 PY-81981 Sync pushed language level
GitOrigin-RevId: d60893c0631846bf411819c5d2687e411a0a578c
2025-07-22 19:28:39 +00:00
Petr
685695021f PY-81471 Move lang.foldingBuilder to common
GitOrigin-RevId: 3c4f9cc773d14492e9fbf026f0472a908c9262ec
2025-06-18 20:02:26 +00:00
Petr
e33aae05fc PY-81471 Move PyStatementMover to python.syntax
GitOrigin-RevId: c9cb03c1bb97720c392ea482765790674f27b647
2025-06-13 20:21:11 +00:00
Petr
aa82ce5f70 PY-81646 Get rid of EMPTY_EXPRESSION nodes within SLICE_ITEM
GitOrigin-RevId: 6ffe0027790bb41b8ac18251903529aa1b1243f6
2025-06-13 18:59:31 +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
Morgan Bartholomew
1cfa311783 [python] Rename NoneLiteral .java to .kt
GitOrigin-RevId: cd696ce62a90c0205cee0dbbcccad54e87a85386
2025-05-29 01:00:27 +00:00
Andrey Vokin
779b6b9973 PY-80502 PyCharm became unresponsive with a 100% CPU load when optimize imports
GitOrigin-RevId: c8305e57d98f5ec11a57eda72551da6a00b2d810
2025-05-28 12:49:21 +00:00
Petr
c8fb196d52 PY-76877 Conformance test failure: overloads_basic.py
PySliceExpression is replaced by PySubscriptionExpression in AST.
PySliceItem is returned by PySubscriptionExpression.getIndexExpression(). For that purpose PySliceItem is now a PyExpression of type `builtins.slice`.

GitOrigin-RevId: 9aa8de13ef7c51741e248317c5264b3a06ffb9bf
2025-05-12 18:15:13 +00:00
Mikhail Golubev
b8c67616f1 PY-79967 Make PyFormattedStringElement.isFormatted actually check "f" in the prefix
Because now PyFormattedStringElement represents both f-strings and t-strings.

GitOrigin-RevId: d63579976773af811ff5a6c6fcd08e4471ede7d9
2025-05-02 12:08:57 +00:00
Koudai Aono
7239d2ef2c PY-79967 Support t-prefixed strings, Related PR: https://github.com/JetBrains/intellij-community/pull/302
* Add PYTHON314_PREFIXES to CompatibilityVisitor
* Patch typeshed, add t-string related stubs
* Infer `string.templatelib.Template` type for t-strings instead of plain `str`



GitOrigin-RevId: 0e913910ab9e0dca4052856b0585ce66265291c0
2025-04-28 19:14:39 +00:00
evgeny.bovykin
73936d2b0d ScopeUtilCore - use .getGreenStub instead of .getStub to guarantee that the stub is not null
GitOrigin-RevId: e6eecfa890377ecd29d2ba42aef97873467e24c7
2025-04-03 13:16:07 +00:00
Aleksandr.Govenko
a0e317c52f PY-80044 ArrayIndexOutOfBoundsException from PyDataFlow under specific conditions
Merge-request: IJ-MR-158616
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com>

GitOrigin-RevId: 4bb51242c2b5545ea4ce499664734903a70b900e
2025-03-27 18:53:20 +00:00
Aleksandr.Govenko
fdd47a988b PY-76825 Conformance test failure: namedtuples_define_functional.py
Merge-request: IJ-MR-157423
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com>

GitOrigin-RevId: 43e0729c540507d0a280d46aee4ca086e572d527
2025-03-13 20:55:38 +00:00
Aleksandr.Govenko
0073c7a8bb PY-48011 Pattern Matching: Type inference
Merge-request: IJ-MR-154823
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com>

GitOrigin-RevId: 42cb07bee63f34127c85574fc9c09e6043bc7591
2025-03-07 22:56:00 +00:00
Vladimir Krivosheev
0bc1cf1557 update bazel files
GitOrigin-RevId: 7320d3eff3aba093692ce66839c720ece6d7c4db
2024-12-30 11:28:24 +00:00
Vladimir Krivosheev
7b9ec58009 do not export intellij.database.connectivity.tests
GitOrigin-RevId: a1ef44dfa34cde110c9e6cad19d11b5e3019ab72
2024-12-28 21:45:55 +00:00
Vladimir Krivosheev
68d99c6550 cleanup
GitOrigin-RevId: 9cb238c220249088bfc75a448eb310b93c7fc45c
2024-12-26 14:56:01 +00:00
Vladimir Krivosheev
98799639aa do not use _test as lib - test targets do not support this
GitOrigin-RevId: f2f49db4294b6a64040dbbd5f1d95e972cbd70a3
2024-12-15 18:32:30 +00:00
Vladimir Krivosheev
17916c90f8 libraries -> lib, resources, opt-in, test deps
GitOrigin-RevId: db66ee95dcb0f0553b40c9cc56cd6afed8634cdd
2024-11-27 13:53:42 +00:00
Aleksandr.Govenko
31dd92576e PY-20611 Missing warning about functions implicitly returning None when return type is not Optional
Updated PyFunction to account for implicit 'return None' statements when inferring return statement types.

It affected return type inference of PyFunction.

Fixed a failing test related to formatted strings.

Added a quick fix to make all return statements explicit.

Updated the CFG to include PyPassStatements, enabling detection of exit points in empty functions.

Simplified PyMakeFunctionReturnTypeQuickFix to independently infer function types and handle required imports. Currently, it does not support specifying custom suggested types.



Merge-request: IJ-MR-148719
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com>

GitOrigin-RevId: 9f58961f9eb70e4f9dbba7359f5aafdfd392b7e2
2024-11-26 17:02:37 +00:00
Alexander Kuklev
b076ea2794 [PY-33917] Now '__init_subclass__' is treated as and constructor-like method in appropriate cases
GitOrigin-RevId: c2ac58960f641868006141ae3001c932c6a8eaaf
2024-11-22 20:44:45 +00:00
Petr
9034b13880 PY-75537 Implement PyAstNamedParameter.getRepr()(PyFrontendElementTypesFacadeImpl.kt)
GitOrigin-RevId: ef38af29fd176324f4c1bec503a116a5b4f351b4
2024-10-16 10:54:46 +00:00
Petr
6a3cfa9f34 PY-75537 Implement PyAstStringLiteralExpression.createLiteralTextEscaper() (PyFrontendElementTypesFacadeImpl.kt)
GitOrigin-RevId: c42b7626a6e57c118e7028a4806bd8fa7938076c
2024-10-16 10:54:46 +00:00
Petr
a1c0baf9c5 PY-75537 Implement PyAstStringLiteralExpression.getStringValue(), PyAstStringLiteralExpression.getStringValueTextRange() (PyFrontendElementTypesFacadeImpl.kt)
GitOrigin-RevId: 372f147a61e07c6cb21aaeb8a7d0f3d14d49417d
2024-10-16 10:54:46 +00:00
Petr
5befce7fb9 PY-75537 Implement PyAstAssignmentStatement.getTargetsToValuesMapping() (PyFrontendElementTypesFacadeImpl.kt)
GitOrigin-RevId: 8c4926689e42f117275986c2e1246d7e04bde489
2024-10-16 10:54:46 +00:00
Petr
05942bee35 PY-75537 Implement PyAstAssignmentStatement.getTargets(), PyAstAssignmentStatement.getRawTargets() (PyFrontendElementTypesFacadeImpl.kt)
GitOrigin-RevId: 0f9292ac3ca0f4f4728b25cb2e5ddcd618b8319d
2024-10-16 10:54:46 +00:00
Mikhail Golubev
44e22f679c Fix ScopeUtilCore.getScopeOwner for immediate PyDecorator and PyNamedParameter elements
GitOrigin-RevId: 6013da7fbdf9e41ced1a32cae091d79014777a82
2024-09-09 11:34:15 +00:00
Daniil Kalinin
7751fceaed PY-71002 PEP-696: Support new syntax for default types of Type Parameters in new-style declarations
- PEP-696 adds a new syntax for declaring the default types of Type Parameters in new-new style generic classes, functions and type alias statements. Support these grammar changes.
- Store info about default types in stubs for Type Parameters
- Increment the stub version counter in PyFileElementType

GitOrigin-RevId: b6b22e3eaa86ce06132885781e5775a89bf4b840
2024-09-07 11:11:12 +00:00
Aleksandr.Govenko
9b5b413d45 PY-24044 Evaluate expression and conditional breakpoints should allow adding imports for unresolved names
Added new PyCodeFragmentWithHiddenImports that allows adding imports for unresolved names into a hidden file

GitOrigin-RevId: fb3fa4e491164bdd376d3b25204202034994afa5
2024-08-23 13:37:42 +00:00
Petr
a3608ebd22 PY-34617 Remove if stubs
GitOrigin-RevId: 13f49394e92daca80af9c82ac9ac1a439a6ae1f5
2024-08-12 09:37:32 +00:00
Petr
7f22ee443e [python] Fix nullability annotations (PyAstNumericLiteralExpression)
GitOrigin-RevId: d5db0add83ac134aab91198b1a931c026829d216
2024-07-28 15:43:22 +00:00
Petr
93b9066edf PY-34617 Support version check
GitOrigin-RevId: 3318ff79cdcc5ba0ce5e4feb65abad5ad0f4acfa
2024-07-28 00:24:15 +00:00
Petr
16a7fb4b3e PY-34617 Move getTopLevelAttributes(), findTopLevelAttribute() from PyAstFile
GitOrigin-RevId: 226a7e968851ab0c8730bb79ca90d0ed5dcec364
2024-07-28 00:24:15 +00:00
Petr
cfa28c0d2a PY-34617 Move getClassAttributes(), getOwnSlots() from PyAstClass
GitOrigin-RevId: 39ee4f79543a35fc696f9c754f5c5cf89b711f63
2024-07-28 00:24:15 +00:00
Vladimir Koshelev
ec8c3a8aa3 [pycharm] remdev: migrate PyCharm Frontend launcher to v2 modules
GitOrigin-RevId: e2c62c23bd0a22c742a46177c1a1ad4c4b5b95d0
2024-07-24 13:13:53 +00:00
Andrey Vokin
e6c66dfd5e PY-74012 Deprecation decorator stub resolves during indexing
Avoid using resolve when calculating deprecation messages

GitOrigin-RevId: 813849bdaeb3819b445db600fc0efbcb014ed5c9
2024-07-19 19:18:54 +00:00
Daniil Kalinin
e9a6246df3 PY-72185 Implement incremental parsing for PSI leaves for Python
Merge-request: IJ-MR-138193
Merged-by: Daniil Kalinin <Daniil.Kalinin@jetbrains.com>

GitOrigin-RevId: 7d004677a5b7a4637ea956f13ed85abc0d88604e
2024-07-17 12:15:36 +00:00
Mikhail Golubev
8eb96b314a [python] Delegate to visitPySequenceExpression when visiting PySetLiteralExpression
GitOrigin-RevId: be032f963dccd6ebc062517047c5a1c962b31ec6
2024-07-11 19:46:02 +00:00