Also fixes PY-59014, PY-39761.
PyResolveImportUtil returns both .pyi stubs and the corresponding .py files for stub packages
to support partial stub packages. See the line:
```
groupedResults.topResultIs(Priority.STUB_PACKAGE) -> firstResultWithFallback(groupedResults, Priority.STUB_PACKAGE)
```
in PyResolveImportUtil.filterTopPriorityResults.
It means that, for instance, resolving the QuerySet name in type hints led to QuerySet
definitions from both places. Then, PyTypingTypeProvider.getType() for the reference expression
"QuerySet" returned a union type containing PyClassTypes for both of them, we couldn't parameterize
it in PyTypingTypeProvider.getParameterizedType and returned Any.
It's wrong that while evaluating type hints, we interpret multiple declarations as
a union type. Those should only be explicitly expressed with typing.Union or "|" operator.
This behavior was originally added in PY-18427 as an ad-hoc way to support version checks
for type hints, but now it seems detrimental because it's unclear how to parameterize
such implicit unions of generic types then.
Other type checkers also don't treat conditional definitions like that. For instance, for
conditional type aliases, Mypy complains about the name being defined twice and then uses
only the first definition, and Pyright doesn't consider names under conditions other than
version checks as valid type aliases at all. Both type checkers also support partial stub
packages properly.
GitOrigin-RevId: 1ecc7ab5d09625d10850ddc0e1f7761332ccddd5
- First newline character
- First non-space character
- Any character after indentSize space characters
GitOrigin-RevId: 80f413bb01cf784ed0f9266af35cc503a0f9f05f
- Registry was converted from java to kotlin, then resolve inside sources start to return functions from the companion object. At the same time, decompiled code still returns bridges from Registry itself and thus was not affected by the bug.
- Test covers now only "sources" case, because the compiled case is covered by java/k1 tests.
^KTIJ-31444 fixed
GitOrigin-RevId: 59dfa24c89b89057e6af3e5da939cf7a93bdb8fa
This is no longer needed when using JPS 2.0 because the K2 compiler has changed the resolution to the new way.
KTIJ-30704
(cherry picked from commit 98f33cb4238b9c2ad50e5ca40bf1ef9cfd7ca1b2)
GitOrigin-RevId: 9c29f53dfd939a542cc22a38e0b11f424c8a44c0
This field will help to differentiate tests based on some configuration:
* split vs monolith
* custom JBR
* Kotlin K1 vs K2
* custom GC
and so on
GitOrigin-RevId: aae71f28d6c57dfdc3d9a8a7365662bf353f6d5b
Otherwise it's not possible to add new parameters to the command without breaking old versions of IDE
GitOrigin-RevId: 4d2d8e7ab87bac4435f42a430d1c129f4b5cac9a
We now use `helper.py` which is a cumbersome because Windows agents do not have python by default.
We need to use kotlin script to make helper both cross-platform and independent of the runtime.
As for now, we simply disable in on the TC@Windows.
GitOrigin-RevId: 0daf7f1d25cc57bb3afe1e6aace67ccb15637c04
`getComponent` accepts `projectPathField`.
We use `ProjectPathProvider` to update project name from this field.
V2 panels are also affected: they now share logic (`ProjectPathFlows`) with project name component.
See `com.jetbrains.python.newProjectWizard.projectPath`
GitOrigin-RevId: f7b306fbbd9777925274513effd56009a0614f9a