* Add PYTHON314_PREFIXES to CompatibilityVisitor
* Patch typeshed, add t-string related stubs
* Infer `string.templatelib.Template` type for t-strings instead of plain `str`
(cherry picked from commit 0e913910ab9e0dca4052856b0585ce66265291c0)
GitOrigin-RevId: f03a68ae9aee458a74eccc19c38d8d3e4dc7491a
There are lots of methods that return "default value" if provided data can't be parsed. It leads to errors and misunderstandings
Signed-off-by: Ilya.Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: 0736c91c91e1e6990d23169a492ec408f7299830
The problem previously appeared in situations when an identifier was changed to a keyword, i.e. `a: Tru` -> `a: True` and `True` keyword was not highlighted properly as it was substituted by an identifier AST leaf as is bypassing the highlighting lexer
Add a couple of tests on it
GitOrigin-RevId: ec25d2115ec650bf781a9fe8140e8708e849ff60
Add API for inferring the expected type of `__set__` from `value` parameter
Add corresponding logic to PyTypeCheckerInspection to check if assigned value matches the expected descriptor type
Add tests on it
GitOrigin-RevId: b14ab7b2e40e225b508875a778ceae8986cbb291
Deprecated APIs which still have internal usage are marked as internal to ensure that new external usages won't appear.
GitOrigin-RevId: 09818b884851d7b768f8ee0f356f982e79b46ed9
- 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
1. Delete `intellij.python.community.impl.xml` (move content to `PythonCore` plugin). It is necessary to fix incorrect dependencies: `PythonCore`, `Pythonid` include the same module.
2. Fixed dependencies: if some plugin/module needs Python core functionality, then it should depend on `PythonCore`.
Co-authored-by: Vladimir Koshelev <Vladimir.Koshelev@jetbrains.com>
Merge-request: IJ-MR-136158
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>
GitOrigin-RevId: ce9ed4c17f601ee1ca2b6cf608f4e30fdac1d879
These changes make PyStatementList elements (which are function and class bodies, cycle bodies, if-else branches, etc.) lazy-parseable which means they can now be reparsed without reparsing the whole file if changes are happened inside them accepted as safe
The main reason behind these changes is to improve performance
GitOrigin-RevId: 892acbe0c95fde6aec74b7595b0a58f902c426f5
Instead, parse them as usual and later report in the dedicated AssignTargetAnnotator
and TypeAnnotationTargetAnnotator. This way, a PsiError element appearing in the PSI
tree of a type declaration statement doesn't cause PyAstTypeDeclarationStatement.getTarget
nullability contract violation.
GitOrigin-RevId: a3e90088cfac7938c398d4d293a72dbd127a2cd0
Icons removed from SDK package (no need to have a separate class for it), ultimate icons moved out of community module.
There are only 3 icon packages in community:
* `PythonParserIcons`
* `PythonPsiApiIcons`
* `PythonIcons` (aka `intellij.python.community.impl`)
Latter two have `.json` mapper to replace old icons with new one for New UI which is included into corresponding `.xml` file.
GitOrigin-RevId: 0438ad4485b5a82a89c81ec63ae6e575d5bb52de