- adjust parser to support comma separated list of error classes
- add problem annotation and quick fix for missing parentheses
- add new tests, adjust old tests
GitOrigin-RevId: 545f3597a488f85ba2ff17da0a389f2aed226406
- special case for awaiting a call to an imported, untyped, non-async function
(cherry picked from commit 8eec47ca4560ae0577e8c6157ef533952436b3b4)
IJ-MR-168288
GitOrigin-RevId: 5ae73b7b663e94996116706a775b9fed683f331e
PY-55691: `Expected type 'Type[AttrsInstance]'` warning passing `attrs` class to `attrs.fields()`
- add member __attrs_attrs__ to classes decorated with attrs.define or similar
Merge-request: IJ-MR-165647
Merged-by: Marcus Mews <marcus.mews@jetbrains.com>
(cherry picked from commit 979f894e595d903c55f33c8bd4c5c3d06cb2fe6d)
IJ-MR-165647
GitOrigin-RevId: d668282db59d6a6fcea1d40bb36aa4ee48585dea
We've long enabled numpy's own pyi stubs by default.
Now, without always available numpy stubs in python-skeletons this extension
causes an SOE when there is a module called numpy
(see `SemanticPyUnresolvedReferencesTest.test unresolved import from well-known installed import are critical`).
GitOrigin-RevId: 3cb4ff5ca3404cb4f20dd584da5928c78b73ea91
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
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
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
Using generic classes (parameterized or not) to access attributes will result in type check failure.
GitOrigin-RevId: a4c8c419dd46aaab9a66cf42391821d9035c5dba
* Ensure 'Concatenate' is only allowed as the first argument to 'Callable' in type hints.
* Added a test
* Exclude 'generics_paramspec_basic.py' from ignored as it passes now
GitOrigin-RevId: f44af8fc1426ce7b6d7f725b4a72270bc8015d0f