Aleksandr.Govenko
4dd41ee9f5
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 >
(cherry picked from commit 9f58961f9eb70e4f9dbba7359f5aafdfd392b7e2)
IJ-MR-148719
GitOrigin-RevId: 68ef5c4a1cc0fcaffd750cc0713250a106136643
2024-12-17 18:16:40 +00:00
Petr
08c5bfb142
PY-75537 Implement PyAstNamedParameter.getRepr()(PyFrontendElementTypesFacadeImpl.kt)
...
(cherry picked from commit ef38af29fd176324f4c1bec503a116a5b4f351b4)
GitOrigin-RevId: 9b47c8018c3f8ad04c365175bbeb2791feb966cc
2024-10-18 17:10:51 +00:00
Petr
411f36db5a
PY-75537 Implement PyAstStringLiteralExpression.createLiteralTextEscaper() (PyFrontendElementTypesFacadeImpl.kt)
...
(cherry picked from commit c42b7626a6e57c118e7028a4806bd8fa7938076c)
GitOrigin-RevId: e68adbb728051d49654d76df856b522191330170
2024-10-18 17:10:51 +00:00
Petr
78c67850e3
PY-75537 Implement PyAstStringLiteralExpression.getStringValue(), PyAstStringLiteralExpression.getStringValueTextRange() (PyFrontendElementTypesFacadeImpl.kt)
...
(cherry picked from commit 372f147a61e07c6cb21aaeb8a7d0f3d14d49417d)
GitOrigin-RevId: 9682c8df1f0acd21580e87d8381995960abeeb8a
2024-10-18 17:10:51 +00:00
Petr
001266a5b7
PY-75537 Implement PyAstAssignmentStatement.getTargetsToValuesMapping() (PyFrontendElementTypesFacadeImpl.kt)
...
(cherry picked from commit 8c4926689e42f117275986c2e1246d7e04bde489)
GitOrigin-RevId: f83b02700ce17a182807ac8bfe1a0108e09d4741
2024-10-18 17:10:51 +00:00
Petr
34a015c9af
PY-75537 Implement PyAstAssignmentStatement.getTargets(), PyAstAssignmentStatement.getRawTargets() (PyFrontendElementTypesFacadeImpl.kt)
...
(cherry picked from commit 0f9292ac3ca0f4f4728b25cb2e5ddcd618b8319d)
GitOrigin-RevId: ced0f2fe8d877e80af4f4568a11cf8ab0f64d57c
2024-10-18 17:10:51 +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
Mikhail Golubev
ded1e5d860
[python] Implement acceptPyVisitor in PyStatementListImpl and PyAstStatementList
...
In PyStatementListImpl, it was seemingly accidentally removed as part of
892acbe0c95fde6aec74b7595b0a58f902c426f5.
GitOrigin-RevId: 17b8db2ee2c779cb32cee346f59fb3cc56911288
2024-07-01 16:43:01 +00:00
Andrey Vokin
f2a322c6d9
PY-73107 Usages of @warnings.deprecated inside .pyi stubs are ignored
...
GitOrigin-RevId: 7682eff8c8ca8ae8241ddee3191add34ab2ac22e
2024-06-17 22:26:51 +00:00
Mikhail Golubev
aff932b7c9
[python] Add methods visitPyKeyValueExpression to PyElementVisitor and PyAstElementVisitor
...
GitOrigin-RevId: 247a02160e18c93a00b1630e2ed70cea6dcefbbf
2024-06-13 11:59:38 +00:00
Andrey Vokin
673383c3da
PY-61651 Deprecation highlighting with PEP 702 @deprecated decorator
...
GitOrigin-RevId: 426e7001d20849d7029fea55431d3e2cfae3eb11
2024-06-10 15:58:53 +00:00
Petr
3f43255122
PY-73076 Ctrl+Z doesn't work in RemDev
...
GitOrigin-RevId: e80b54e1a43e9f83be921096a1bc3a0059795cb7
2024-06-05 17:51:13 +00:00
Petr
4602d09655
PY-61639 Extracted PyHighlightingAnnotator
...
GitOrigin-RevId: 432bcb87b77fa55f1ccb26000d91ae021cebcc6b
2024-03-27 15:05:16 +00:00
Petr
b9167aef8b
PY-61639 Move PyPreFormatProcessor to python.syntax.core
...
GitOrigin-RevId: 30d204206de9e09eae34baf0555fc9be5822ba68
2024-02-16 15:53:21 +00:00
Petr
3b9b10b296
PY-61639 Move extendWordSelectionHandlers to python.syntax
...
GitOrigin-RevId: d5957878544a0026f249109ca1df0a18e20a8a55
2024-02-16 15:52:51 +00:00
Petr
85c54b3a4c
PY-61639 Move PythonFormattingModelBuilder to python.syntax.core
...
GitOrigin-RevId: bdcbd076cd3c1531204eff35515b44cd0edc9f68
2024-02-16 15:52:22 +00:00
Petr Golubev
25b8ebcf83
PY-61639 Extracted PythonEnterHandler
...
GitOrigin-RevId: 8fd0c063c917e07c3f1bf98533c3de867f770ee9
2024-02-08 13:58:08 +00:00
Petr Golubev
1a73bd2d21
PY-61639 Extracted PyAstElementGenerator
...
GitOrigin-RevId: 915c235120b079188d81efaa9ccf9728131fa3df
2024-02-08 13:58:08 +00:00
Petr Golubev
c90db007c0
PY-61639 Lift PyFile.getTopLevelAttributes(), PyFile.findTopLevelAttribute() to PyAstFile
...
GitOrigin-RevId: 373accde23bb2c55d1d23266da7874e34da96ea3
2024-02-08 13:58:08 +00:00
Petr Golubev
f818966298
PY-61639 Lift PyParameter.isSelf() method to PyAstParameter
...
GitOrigin-RevId: 919518e5d06f2b968974bfdbd8deea2ced03c822
2024-02-08 13:58:08 +00:00
Petr Golubev
223013dad1
PY-61639 Introduced PyAstElementVisitor
...
GitOrigin-RevId: 6ee69922a4ade172dba5abb3ea3b13d01c2b0ebc
2024-02-08 13:58:08 +00:00
Petr Golubev
7668d7231b
PY-61639 Remove unused methods (PyAstElement)
...
GitOrigin-RevId: 5c916dad7c470a8951497740771c5e848d1e0266
2024-02-08 13:58:08 +00:00
Vladimir Koshelev
aec2051aa9
[python] get rid of IStubElementType and move logic about working with stubs to impl classes PY-61639
...
GitOrigin-RevId: 062dead109c25d944d4f61e901dc3c64c00b392e
2024-01-19 23:14:49 +00:00
Petr Golubev
b3c3216f79
PY-61639: Extracted python ast
...
GitOrigin-RevId: 4fc0ae909811302d8425f1e67d8c648c290afcb3
2024-01-17 17:23:01 +00:00