Daniil Kalinin
573c282931
PY-79693 Fix false-positive: NoReturn and Never are wrongly reported as invalid type arguments
...
(cherry picked from commit e03f60689c6462dbb02cc869992233bb78fb0524)
GitOrigin-RevId: 31b3cba395df81274a76675ac061348bb8d2bf7e
2025-03-12 15:40:24 +00:00
Aleksandr.Govenko
abe414ffc5
PY-48011 Pattern Matching: Type inference
...
Merge-request: IJ-MR-154823
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
(cherry picked from commit 42cb07bee63f34127c85574fc9c09e6043bc7591)
IJ-MR-154823
GitOrigin-RevId: 2ad321e755a0efd262c077b2ea2571143ec72600
2025-03-08 03:26:16 +00:00
Aleksandr.Govenko
c02ef9f62d
PY-78964 Incorrect return type warning when using try...finally
...
Added a new CFG instruction to indicate implicit raise after finally block. Also added PyDataFlow as an future entry point for DFA.
Merge-request: IJ-MR-155798
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
(cherry picked from commit db63ba632c48235cc51b8e64869d21f5bcfc2d1c)
IJ-MR-155798
GitOrigin-RevId: b913e67a07e035b03f1092d5b6d9529864cb4d1b
2025-03-07 16:41:12 +00:00
Aleksandr.Govenko
4360534147
PY-76876 PY-76856 PY-76836 Conformance test failure: qualifiers_final_decorator.py qualifiers_final_annotation.py dataclasses_final.py
...
Merge-request: IJ-MR-156322
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
(cherry picked from commit 1a049f52b4dfbdc86bd640a0cd547ead73a6af43)
IJ-MR-156322
GitOrigin-RevId: 0cff70d5f4c48b1af3807f38a8d1e18de8049acd
2025-03-07 02:03:04 +00:00
Alex Grönholm
f39cf6739e
PY-15985: Don't suggest replacing a chained assignment with an augmented assignment
...
(cherry picked from commit 6022b2b19e28b4ea424ee1022e07be328d636ad3)
GitOrigin-RevId: 2b38f6bebe2c02cd02725de78c7532c498676997
2025-03-06 21:48:52 +00:00
Alex Grönholm
c63994201b
PY-32478: Suggest adding "async" to a function with the error "'await' outside async function"
...
Merge-request: IJ-MR-156125
Merged-by: Andrey Vokin <andrey.vokin@jetbrains.com >
(cherry picked from commit f3a2bc86331013879716b6991da26307c63b10fc)
IJ-MR-156125
GitOrigin-RevId: 10f0b3a8f60469af64bfd97613f258a282c9d0e2
2025-03-05 15:38:39 +00:00
Aleksandr.Govenko
deff665f6f
PY-21069 Annotated return types for __getattr__ and __getattribute__ methods are not taken into account by type checker
...
Check return type of `__getattr__` when other means to get type of qualified expression failed
Merge-request: IJ-MR-155099
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
(cherry picked from commit 66e3c0dcc078f7e533b6495c6a43693e6e3909dc)
IJ-MR-155099
GitOrigin-RevId: f9c515a440fa972ef6ca621123a29f3b854d4245
2025-03-02 00:19:18 +00:00
Aleksandr.Govenko
5c0fa2026a
PY-26947 Class variable mistaken as module global variable
...
Prevent resolving class-level target expressions in global scope.
Merge-request: IJ-MR-155098
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
(cherry picked from commit 2452801387ee2480e61b2f5119e7f3f2704cb4ef)
IJ-MR-155098
GitOrigin-RevId: a820d911ee38769c194d3fa4900b1f80e1d1fa75
2025-03-02 00:03:47 +00:00
Nikita Ermolenko
f44b1848c9
JBAI-11476: Update feature provider namespaces and ML model version
...
Removed unnecessary namespace separators in feature providers to simplify definitions. Updated the ML model dependency from "lilac-coua" to "coral-panda" with corresponding artifact references. Adjusted typing feature keys for consistency.
(cherry picked from commit ef5561233dee5c13b7ad304bfa0fd5399d30eafd)
IJ-CR-156068
GitOrigin-RevId: c49ff1b73a56009e1db24a0e993fa6cc52a0d87f
2025-02-26 19:37:27 +00:00
Nikita Ermolenko
95021bf728
JBAI-11476: Refactor feature computation to include implicit null values
...
* Introduced `computeFeaturesWithImplicitNull` to handle nullable feature declarations by adding implicit null values when required
* Fixed namespace separators in feature provider definitions as it should be /
(cherry picked from commit 6b8b9a5831dd649288ffe551ff01c8f006935b78)
IJ-CR-156068
GitOrigin-RevId: 2593c2b08e764d9f8961040c67289170753281db
2025-02-26 19:37:27 +00:00
Petr
af04ae3074
PY-77422 Unresolved references to symbols defined under unmatched version checks
...
GitOrigin-RevId: 4bd71ea54db39d6c77450e04061a1a530585bd7d
2025-02-26 15:34:58 +00:00
Leonid Shalupov
7d84c5875d
housekeeping: remove java unused imports
...
GitOrigin-RevId: 50b8b3e069e74a3cdab6d72c58e030318201eaed
2025-02-19 22:59:23 +00:00
Petr
bd01e08aa1
PY-79164 Type narrowing based on containment check
...
GitOrigin-RevId: 198bd07ddb906827e35d9da851d9711b03e071d7
2025-02-19 03:17:19 +00:00
Petr
0aadde642c
PY-76906 Do not narrow to LiteralStringType
...
GitOrigin-RevId: 9f68978401f0f437045b59d818748fc97a594043
2025-02-19 03:17:19 +00:00
Vladimir Krivosheev
c16b8d6ea8
fix ClassesDependencyMap visibility
...
GitOrigin-RevId: 8f5ef4f5f46198bba844d3c2e45609765ed0422c
2025-02-18 12:35:48 +00:00
Vladimir Krivosheev
2328360b7c
fix BaseExtResourceAction visibility
...
GitOrigin-RevId: f3cf04fa81d3955328d6f19aa989f07c92816232
2025-02-18 08:17:49 +00:00
Mikhail Golubev
2e79c02e1d
PY-79060 PY-79098 Properly match typing.Concatenate with other parameter variadic types
...
GitOrigin-RevId: dac336addc0e9ed1fbe77d2f677c09e2ff711850
2025-02-17 22:40:16 +00:00
Vladimir Krivosheev
b36f495c46
fix PyCustomizableStubElementType visibility
...
GitOrigin-RevId: 2f905bb9428abd11d6907328b8b01a166b8e18d9
2025-02-17 14:04:36 +00:00
Petr
28e20dccec
PY-79163 Infer Literal type for a variable qualified as Final
...
GitOrigin-RevId: dd191df850c762ccc53f94024e851c20db39b9c4
2025-02-16 21:29:01 +00:00
Petr
a0b2e6df84
PY-79227 Missing errors for invalid 'Literal[...]' index expression
...
GitOrigin-RevId: 683e54516be2b3bb83e1a5ffb92bc4ad71e7195b
2025-02-16 19:21:22 +00:00
Petr
2f550adde6
PY-79227 Missing errors for invalid 'Literal[...]' index expression
...
GitOrigin-RevId: a2b6becfd5eb52cbde690924ef6c91d57cd30b08
2025-02-16 19:21:22 +00:00
Petr
27d10b58b3
[python] Collapse if statement (PyTargetExpressionImpl)
...
GitOrigin-RevId: 4d76b3a2dbbfe4b6aeb058f2da814443ac11707e
2025-02-16 19:21:22 +00:00
Vladimir Krivosheev
deff46af4b
fix JdlUnknownOptionInspection visibility
...
GitOrigin-RevId: 90002003fb28534511d998c7f7f90e89e88d7c0d
2025-02-15 13:27:50 +00:00
Vladimir Krivosheev
37206789a8
fix DocstringFormatterRequest visibility
...
GitOrigin-RevId: f073418e660b787c6b35a82dfc24b3d4e226eed5
2025-02-15 13:27:50 +00:00
Vladimir Krivosheev
2a351c80b9
fix JsonPropertyMixin visibility
...
GitOrigin-RevId: 6f6e4210ab985d0fabfda71798aba53befd63037
2025-02-15 08:49:08 +00:00
Mikhail Golubev
d5e40b4ad4
PY-78236 Rename PyTypeVisitor#visitPyType to just #visit, add javadoc
...
Similarly to PyRecursiveTypeVisitor#traverse and PyCloningTypeVisitor#clone.
GitOrigin-RevId: 285537e4b7f9326ded81dcd648fa510572c0aba3
2025-02-14 18:53:22 +00:00
Mikhail Golubev
7fd8018705
PY-78236 PY-79060 Migrate PyTypeChecker#substitute to PyCloningTypeVisitor
...
Also, fixed the problem with substitution of PyConcatenateType
inside generics other than the standard Callable. It didn't work
properly before, as we propagated PyConcatenateType unchanged.
GitOrigin-RevId: 1c8867dad9afc34558a87a6325a04572feb0b62e
2025-02-14 18:53:22 +00:00
Mikhail Golubev
c8002968cc
PY-78236 Migrate PyDocStringTypeProvider#setTypeVarScopeOwners to PyCloningTypeVisitor
...
It allowed to get rid of PyGenericType.setScopeOwner hack, modifying the type inplace.
GitOrigin-RevId: dd9389ae496a7e1afa3bc7101d907fcc3d170d5e
2025-02-14 18:53:22 +00:00
Mikhail Golubev
80f2df2d3e
PY-78236 Introduce PyCloningTypeVisitor API
...
GitOrigin-RevId: 01698fa729573f08133b253c5ae575a7ff5216c0
2025-02-14 18:53:22 +00:00
Mikhail Golubev
a171bcc922
PY-78236 Migrate PyTypeHintGenerationUtil#collectImportTargetsFromType to PyRecursiveTypeVisitor
...
GitOrigin-RevId: f505cfb0f8d58d3d3afa85f52249092225b484f4
2025-02-14 18:53:22 +00:00
Mikhail Golubev
383f33ac24
PY-78236 Migrate PyTypeChecker#collectGenerics to PyRecursiveTypeVisitor
...
GitOrigin-RevId: bc544304044fd63cba2eece74816263f2057dcb5
2025-02-14 18:53:22 +00:00
Mikhail Golubev
5aaa51d8f8
PY-78236 Introduce PyRecursiveTypeVisitor API
...
GitOrigin-RevId: 0ada74112706efda714c0d167c7fe16d7dfe7355
2025-02-14 18:53:22 +00:00
Mikhail Golubev
7ae73ebeb6
PY-78236 Introduce PyTypeVisitor API
...
GitOrigin-RevId: b6aa236b364bc55840be0a148205abba9c22167b
2025-02-14 18:53:22 +00:00
Mikhail Golubev
22fc45aeb5
PY-59241 Make sure we don't create instances of PyGenericType anymore
...
So that it's not necessary to define visitPyTypeVisitor in PyGenericType.
GitOrigin-RevId: 1712b8f3820f67821fa17b3910626d39173554a5
2025-02-14 18:53:22 +00:00
Aleksandr.Govenko
e8f5b1c631
PY-52477 PY-78913 Add inspection for inconsistent returns
...
Merge-request: IJ-MR-154297
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
GitOrigin-RevId: e89225212cc981a5b256fca4ee23d77659b3ce5e
2025-02-14 17:21:51 +00:00
Aleksandr.Govenko
6659947437
PY-51564 "code is unreachable" warning does not consider that context managers can abort
...
Added PyWithContextExitInstruction that works as 'except' node in try-except statements, but for 'with context-manager' statements. This allows to see when it can recover from exception by checking the type of `contextlib.AbstractContextManager`
Merge-request: IJ-MR-152213
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com >
GitOrigin-RevId: fd5a139de31d47136cc86b4a7e090a20b73b8744
2025-02-14 13:18:20 +00:00
Alexey Kudravtsev
e3895916cf
show encoding problem for the whole file, instead of the empty string in the very beginning, for which quickfixes are hard to invoke
...
GitOrigin-RevId: 21a06256d25ea4cedac5bc812b41628e9fc2d985
2025-02-14 11:42:03 +00:00
Daniil Kalinin
97ba49d547
PY-26877 Support adding trailing commas to multiline collections, argument and parameter lists
...
Merge-request: IJ-MR-153633
Merged-by: Daniil Kalinin <Daniil.Kalinin@jetbrains.com >
GitOrigin-RevId: b304977e30eb4b378d858fcc5300846dc5965445
2025-02-14 08:46:05 +00:00
Petr
bb55a1b4f0
PY-79129 Report tuple index out of range
...
GitOrigin-RevId: 42c382dfaa5fc75244151d24324b479a62aee85f
2025-02-13 20:03:24 +00:00
Petr
7d1376160a
PY-79129 Subscription expression type inference for tuples and typed dicts
...
GitOrigin-RevId: 4d34fd94900afe6fb5231cf365140098c69d5b43
2025-02-13 20:03:24 +00:00
Petr
5393ae944c
PY-79129 PyTypedDictInspection: Handle literal unions in del and assignment statements
...
GitOrigin-RevId: dc280c36fda7c401adc31f88831a5ae87f225c50
2025-02-13 20:03:24 +00:00
Ilya.Kazakevich
7acbf7eb72
Python: mark API internal
...
GitOrigin-RevId: a0689c7443bb5ea9c3195ee677af64cb10dbac1d
2025-02-12 20:10:01 +00:00
Leonid Shalupov
5db4998301
housekeeping: remove unused imports
...
GitOrigin-RevId: be93bd341860bfc077fdbff5ce2ae91eebada31e
2025-02-11 23:18:34 +00:00
Petr
ebc5586a22
PY-78870 AIOOBE: PyControlFlowBuilder.visitPyAssertStatement
...
GitOrigin-RevId: 204494e52305dd103b36860a609bf3cff00edcff
2025-02-09 12:05:52 +00:00
Petr
f89bcdcabc
PY-78878 Missing error: class type parameter parameterizes an outer scope
...
GitOrigin-RevId: b819ff172605a949156e5bd96d920044b70e1679
2025-02-09 00:26:30 +00:00
Petr
d424ea892b
[python] Delete duplicated method PyUtil.getGenericTypeForClass()
...
GitOrigin-RevId: 700e2d60a86d34fcc0d3c709b2fd9f161f17dfa0
2025-02-09 00:26:30 +00:00
Petr
9c03ffac0e
PY-78798 Use proper type hint context for forward refs
...
GitOrigin-RevId: 238519a26d6a7fb40c827f604faaa0597ef6b238
2025-02-09 00:26:30 +00:00
Petr
a8aedefd14
PY-78798 Unbound type parameters are allowed in TypeVar/TypeVarTuple/ParamSpec defaults
...
GitOrigin-RevId: 375652f5edf52a693c2869be5751ddb5101e419f
2025-02-09 00:26:30 +00:00
Petr
40c9261f96
PY-78798 Handle type parameter scope in type aliases
...
GitOrigin-RevId: 2d09d8a92a045382ddbfccf42d204c8ff5ef2ef8
2025-02-09 00:26:30 +00:00
Petr
32fd97900c
PY-78798 Take into account type parameters in function return type
...
GitOrigin-RevId: eee09f53e3f2110b75fadfe74130b82cff766e92
2025-02-09 00:26:30 +00:00