It should be activated only for the simplest cases when the caret is either
inside an immediate string literal or its prefix is an unqualified reference
expression. It makes little sense trying to detect if something like
the literal string `"y.foobar"` is a possible value for `x`.
It's a relatively heavy completion contributor. It starts evaluating the type of
`x` flow-sensitively, analyzing all preceding function calls to take into
account `NoReturn`. It affects common workflows like typing out
`df = pd.` to create a new Pandas dataframe.
(cherry picked from commit f17fe2ce86ee100a3480a574c7f57a1bd67ec2d8)
IJ-CR-172165
GitOrigin-RevId: 4434488b1d2dae3ab7efd72e775b0c730268e51c
- fix missing return type when last statement is a return statement
- add/adjust tests
- add missing null annotations
GitOrigin-RevId: 8fed189d0130c3b41a5f17a3324684a29b39c0ef
- customize extract method refactoring for Python using prefix Py
- option to enable/disable type annotations
- persist value of checkbox.isSelected
- run all extract method tests using types
- add specific typed test
- adjust api-dump.txt since some members of AbstractExtractMethodDialog were raised from private to protected
- small adjustment in test expectation of the inferred type
GitOrigin-RevId: be6e70dcb61c451debb98c10c0a001234188cb7d
- check all overloads of each decorator to retrieve type annotations
(cherry picked from commit 916e4f796e3295c413f93e3adebf64f4692c8c11)
IJ-MR-166976
GitOrigin-RevId: e11c82034e016c0ff21a4a95e71edf1c496b8116
- special case for awaiting a call to an imported, untyped, non-async function
(cherry picked from commit 8eec47ca4560ae0577e8c6157ef533952436b3b4)
IJ-MR-168288
GitOrigin-RevId: 5ae73b7b663e94996116706a775b9fed683f331e
Previously, we parameterized it in PyReferenceExpressionImpl#getTypeFromTarget
and PyFunctionImpl#analyzeCallType, but this substitution disregarded default types
and substituted free type parameters only with their bounds if those were present,
additionally diluting them with `Any` through a "weak type".
So if we had something like the following:
```
class Ref[T : str = str]:
def get_self(self) -> Self: ...
def get_type_param(self) -> T: ...
x: Ref = ...
x.get_self() # Ref[str | Any]
x.get_type_param() # str | Any
```
it worked somewhat correctly only if the omitted type parameter had a bound
in addition to the default.
One notable example from the standard library is the `open()` builtin
returning `TextIOWrapper` that has a default type parameter `_WrappedBuffer`.
This type parameter ended up either substituted with a "weak type" `_WrappedBuffer | Any`
or completely erased.
This change allowed removing special-casing for Self in PyFunctionImpl#analyzeCallType.
GitOrigin-RevId: 6408d24186bf607a08006f15b380e1eb158e63eb
* Switched to the project-level dependency everywhere
* Introduced a new module intellij.platform.ml.logs to separate ml-api library usages from intellij.platform.ml and intellij.platform.ml.impl modules
* The following models has been adapted to the latest ML API version: python imports ranking, fuzzy resolve, completion trigger model, jetenry inline prompt detection, jetenry fleet code classification
Merge-request: IJ-MR-166415
Merged-by: Vladimir Fedorov <890readrid@gmail.com>
(cherry picked from commit 9056efba5a5397a700daabb453ee1477cfaabdf3)
GitOrigin-RevId: 7cfc63d35b55ac968d5a3b789d2ed5f29d4f12d6
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