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
Previously, there was no chance to resolve `__or__` member for class references like `Callable`, `Generic` as its type is PyCustomType that always returns `null` from getMetaClassType(). Now in operator references we at least resolve such references in types which PyCustomTypes mimic to
GitOrigin-RevId: ff05ae62e4c1a17026310a3407f40597154bc946
The root cause was introduced in PY-23540 (see cb598c94c5).
Namely, abs.ABCMeta was explicitly filtered out from the list of metaclasses in
`PyClassImpl.getMostDerivedClassType` because for some reason in Typeshed stubs for
Python 2 `basestring`, and hence `str`, uses `ABCMeta` as its metaclass,
which is not true at runtime. It caused a metaclass conflict when inheriting `str`
with another user-defined metaclass (`ABCMeta` and a user metaclass didn't extend
each other), so we didn't detect any metaclass in a class as a result.
I've updated Typeshed stubs for Python 2 manually to process ABCMeta normally.
We don't update these stubs anyway, so these changes won't be lost on a future
Typeshed sync.
GitOrigin-RevId: 680e9fa890d00ea63987f3cf73e636e430685f34
I've add-hoc updated typing_extensions.pyi in the bundled Typeshed to
recognize Unpack there.
GitOrigin-RevId: 953402e42984712a630c1772cf2f2cd4cbacdccf
Treat underscore and dash when searching packages equally for pip-based tools, while keeping strict search for conda
GitOrigin-RevId: 176720ac5c51bd6e9486cd7df3744230aa32a37b
Move code from constructor to `fromEnvVariables` to enhance readibility
and be able to use other functions.
GitOrigin-RevId: 921fb0265feb3dc59f42cbf29bffdc77f5313607
It would be better not to place any classes in such a generic package. And it also causes red code due to IDEA-352819, so this needs to be fixed to allow enabling "Good code is red" inspection in "Zero Tolerance" checks.
GitOrigin-RevId: d0edae5ceda7e95fe3b2b9726e5c3996ded149ca
This is needed to work around for IDEA-352818 to allow enabling "Good code is red" inspection in "Zero Tolerance" checks.
GitOrigin-RevId: a058e15624e39c3faa649df20bd4f7c20be5faaf
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
Fix rerunning failed tests for all Doctest.
Do 'Doctest via pytest' option be available not only if a file/fun/class starts with `test_`.
Merge-request: IJ-MR-131237
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>
GitOrigin-RevId: c1e1fda5f66d1e213f34a057175d8e8986a46647
Run Doctest via pytest configuration if `pytest` is installed and selected in settings
Merge-request: IJ-MR-130194
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>
GitOrigin-RevId: 4c97411c3da69249e6b9ad886bcbd9a206db744b
Previously, a multi-file test copied a target entry file both as myTestName.py
and intentions/MyTestName/myTestName.py. As a result, it was impossible to
use relative imports in this file because it resided at a different
level than the rest of the files from the test resource directory.
GitOrigin-RevId: 8d19e038357fc641e8b5ecf5a1d64f0e4dc87d11
The logic is similar to that for instance attributes. Top-level class
attributes and methods defined in the class body get the precedence,
followed by class attributes defined with assignments in @classmethods
unless the latter would resolve to the same assignments as in
cls.attr = cls.attr + 1
finally, we scan through all other class methods resolving the name
to the first definition inside one of them.
So far, I intentionally didn't expose such attributes in findClassAttribute()
or getClassAttributes() because users of these methods assume that
this API considers only attributes defined immediately in the class body.
Adding extra definitions from class methods might break these usages.
I had to update the inspection about typing.Final, because it relied
on the fact that resolve() on assignment targets on class objects can
lead only to those top-level class attributes, where type hints are normally
located, but now it can lead to assignments to a qualified attribute inside
a containing class method.
GitOrigin-RevId: 0ca5bdaa4efca127ac187e822a49df6795e1028a