In particular point that `collection.abc` symbols are defined in _collections_abc.py.
IJ-MR-159943
GitOrigin-RevId: 67e7f402f7bf266e6232aaa05947cb29eed4d9d7
Disable python.use.better.control.flow.type.inference for now
Merge-request: IJ-MR-161520
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com>
GitOrigin-RevId: 98ceafd932e6382847e49dc550c7e9b76c6626b9
DO:
For upper-level (public) API use `PyResult`.
(Optionally) for low-level APIs inside your modules use python `Result<S, E>`.
Represent errors as `PyError` whenever possible.
Report `PyError` to `ErrorSink` at the top of your code.
DON'T:
Use `kotlin.Result`
Use `PyExecutionException`
Use any exception to represent user errors.
GitOrigin-RevId: 4ecf69e1fae8be9192cd33b90e0147c725a98964
* 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
Lexers should be generated in modules where the corresponding grammar files belong.
Namely Python's own lexer in intellij.python.parser, and the legacy type hint lexer in
intellij.python.psi.impl.
GitOrigin-RevId: 602387221c84e92811608aac6730eeb5a7bf2f90
When there is no `finally` in try-except statement, use transparent exit instruction to tie all normal exits from try-, else- and except- parts to the next instruction
Merge-request: IJ-MR-158265
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com>
GitOrigin-RevId: 734581b732a1a558b72811fdda977c470d045cc9
Create DELETE instructions only for unqualified names, as it seems we don't need other ones at the moment.
Merge-request: IJ-MR-159047
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com>
GitOrigin-RevId: e0d9c636c20facf587cb96d8117e6f5f804b847a
Swap back to ConcurrentMap and add more Registry checks
softValueMap doesn't play well with assumeType. Imagine this: you compute type A and store it, then compute type B that depends on A. But since softValueMap uses soft references, A might get garbage-collected. If that happens, you can override A with assumeType, and now B is out of sync — it's still based on the old version of A.
This kind of issue is unlikely to show up in small, artificial examples, but it could easily become a problem in real-world projects, especially large ones. It breaks the assumption that if a type is in the map, then everything it depends on should still be there too.
fix after rebase
Added nullability annotations to the AssumptionContext constructor parameters to improve type safety.
dm-checkpoint-id: 1VH4Od1GtvAo
Squash for easier rebase
Co-authored-by: Space Team <noreply@jetbrains.team>
Merge-request: IJ-MR-146970
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com>
GitOrigin-RevId: cf2fc232c2c5b35a037396b5f85be3129a5efd3a
Some languages may need custom context-dependent space generation
Existing implementation requires `left` argument to be nullable, particularly in WebStorm code. Maybe this need to be revisited and fixed.
GitOrigin-RevId: 2b3744fa84470c6373bef70f7289fc2124183ead
Assignability of metaclass's `__call__` return type to a type being constructed should be used instead of class equivalence.
GitOrigin-RevId: 94ae5d5870ca7deedc42f381456d13cb08d97ffc
Consider references to all elements which type is `PyClassLikeType` or its inheritor as valid type hints, it will help to get rid of other false-positives as well
GitOrigin-RevId: eb27f96c39bd4f616a149a966132b4a9b3d84f04
A class containing at least one method declared with `abstractmethod` decorator that hasn’t been overridden yet cannot be instantiated.
Also report instantiation of classes that directly inherit ABC or have metaclass set to ABCMeta.
GitOrigin-RevId: 55cb4dc90c55ddc63991a4c3f6b50b4e34a3b4bd
It will allow moving the implementation of TypeEvalContext to intellij.python.psi.impl
as well, making more platform and Python plugin APIs available in it.
GitOrigin-RevId: c04a2dc4d892d213f5407bcce35aeb5a3aba42dc