Commit Graph

1032 Commits

Author SHA1 Message Date
Irina Fediaeva
058257cb23 PY-56609: Review remarks
Proper html table row tags

GitOrigin-RevId: 8413ddf84bc1d5d65080447e3f425923cca21c10
2023-01-23 13:39:15 +00:00
Irina Fediaeva
90f54814ca PY-57157: Support markdown in attributes and parameters quick documentation popups
GitOrigin-RevId: c4f1910784494ae9445cdc97dd3528e8cc35714a
2023-01-23 13:39:07 +00:00
Irina Fediaeva
252e4c1684 PY-56609: Refactoring in quick documentation
Replace usages of appendRaw by append

GitOrigin-RevId: 3ee71857898c3303a5c2e96939ab1f9fb91670e0
2023-01-23 13:39:05 +00:00
Irina Fediaeva
c44fb89c28 PY-56609: Refactoring in quick documentation
Migrate to DocumentationMarkup elements

GitOrigin-RevId: ea4d71638b1dd3a160521e655fd2a1670ea27701
2023-01-23 13:39:02 +00:00
Irina Fediaeva
492065b694 PY-56609: Refactoring in quick documentation
Clarify building docstring logic a little bit

GitOrigin-RevId: 8cc52a65829957917a285a6c77d42baa6b0b6cfd
2023-01-23 13:39:00 +00:00
Irina Fediaeva
dac98c01ed PY-56609: Refactoring in quick documentation
Cleanup DocumentationBuilderKit

GitOrigin-RevId: 85d8f4de5bc7ea6f9bf0ca298a7f29f180cb1e06
2023-01-23 13:38:55 +00:00
Irina Fediaeva
bd1c830040 PY-56609: Refactoring in quick documentation
Remove ChainIterable usages from quick documentation and replace with HtmlChunk/HtmlBuilder.
I18ize some fragments.

GitOrigin-RevId: c9b1197efcb17de92361426759a7840ee1be8e4b
2023-01-23 13:38:53 +00:00
Irina Fediaeva
5e4087e221 PY-56609: Refactoring in quick documentation
Streamline docstring logic in PyDocumentationBuilder

GitOrigin-RevId: 2cc1df0794890cefec37d6e5c4170587a3fa1973
2023-01-23 13:38:50 +00:00
Irina Fediaeva
98f4edc289 PY-56609: Refactoring in quick documentation
Simplify DocStringParameterReference

GitOrigin-RevId: 1cfd861cec23d9f7a41d630212a19e41ddae40b7
2023-01-23 13:38:43 +00:00
Mikhail Shagvaliev
c3e7cbcdbb QD-4918 Extracted some strings to resource bundles, fix localization some errors
GitOrigin-RevId: ec07cff1f826a89c3c86b6a2e79ea4b29b14d78c
2023-01-18 18:36:21 +00:00
Nikolay Chashnikov
2999a2c383 cleanup: remove redundant '@author' tags from javadoc comments - 24
Now we have Code Vision hints which determine the author via Git history and show it in the editor automatically, and this information is more accurate than the tags which were automatically added when files were created.

GitOrigin-RevId: f1b80125c2555d89f32aae4e5290d7771a357abf
2023-01-18 17:02:43 +00:00
Nikolay Chashnikov
4a1b1e2eb2 cleanup: remove redundant '@author' tags from javadoc comments - 19
Now we have Code Vision hints which determine the author via Git history and show it in the editor automatically, and this information is more accurate than the tags which were automatically added when files were created.

GitOrigin-RevId: b442e8499110d543d5ec05b9e07f6c0f88b61ecc
2023-01-18 17:02:27 +00:00
Nikolay Chashnikov
4899a5a210 cleanup: remove redundant '@author' tags from javadoc comments - 6
Now we have Code Vision hints which determine the author via Git history and show it in the editor automatically, and this information is more accurate than the tags which were automatically added when files were created.

GitOrigin-RevId: 30586ed1915e3b35394ff3ee6251607c64bbabdd
2023-01-18 17:01:44 +00:00
lada.gagina
f3da5e58ae PY-58374 Fix dict keys completion when editing an existing key
GitOrigin-RevId: 41434300f6ea0f776a115a869fb9578a84015471
2023-01-17 19:01:56 +00:00
Tagir Valeev
56013717c5 [inspections] Rename OptSet -> OptStringList; stringSet -> stringList
This reflects that we usually preserve ordering and in fact map to the List<String>

GitOrigin-RevId: f44eb3efae5db372dfb1747d86b728a23ec5745b
2023-01-17 15:37:26 +00:00
Olga.Lavrichenko
6df5bfd10d DS-1584 DS-2583 Reformat breaks IPython magic commands and shell commands
GitOrigin-RevId: 949528c951d6c9174b1bad21452a90fbdb07b418
2023-01-16 15:13:23 +00:00
lada.gagina
f5db62e099 Sync with typeshed @ df905102da05e99e7e7cd6cd0a1e3ddea2eddba2 (excluding the python2 removal)
[PY-57541](https://youtrack.jetbrains.com/issue/PY-57541/Sync-bundled-typeshed-df905102da05e99e7e7cd6cd0a1e3ddea2eddba2)

GitOrigin-RevId: 50eb01e74255002005343caa51bf8eb21c6028a6
2023-01-13 18:45:18 +00:00
Alexandr Suhinin
42746dc58f cleanup: replace all methods identical to super with delegate
batch fix for inspection: method is identical to its super method

GitOrigin-RevId: bb9fbb32ba5fe09613c28e98eb3dad540d6322f1
2023-01-13 09:57:03 +00:00
lada.gagina
01f87f5c77 PY-42637 Fix quotes for TypedDict keys completion in subscription expressions
If there are quotes, suggest just the key names

GitOrigin-RevId: 58caea6ba1ceeeea790580c3d24d255a636764bb
2023-01-10 17:39:28 +00:00
lada.gagina
ef2f607f5f PY-42637 Fix quotes for TypedDict keys completion in dict literals
- when there are other keys present in the literal, use quotes from there
- when the literal is empty, use double quotes by default
- when there already are quotes, suggest just the key names

GitOrigin-RevId: 5f37cd25c0e47521e78a01ab84053571369b24a8
2023-01-10 17:39:26 +00:00
Daniil Ovchinnikov
578eaaf60e rename library kotlin-stdlib-jdk8 -> kotlin-stdlib
GitOrigin-RevId: cddf45ccfd5563d3fe209bea62a1c37c94f44ff9
2023-01-10 12:22:34 +00:00
Vladimir Krivosheev
57764d700b mark classes final
GitOrigin-RevId: 6414b6f2119c82c7567987dd30b35cab5491d9e2
2022-12-30 06:58:01 +00:00
petr.surkov
06ba0ecaa0 [pycharm] Fix PyFormattedStringElementImpl.isTerminated
GitOrigin-RevId: 3b21495ec81091233e6b71a5cf15f02092b9e47d
2022-12-29 15:25:30 +00:00
Alexey Kudravtsev
0bd5ed5449 fix "immutable collection modified" warnings
GitOrigin-RevId: ec49a122b92288db0588ca66f6c535337f65360f
2022-12-28 13:57:23 +00:00
Tagir Valeev
fb6e8d4302 [inspections] OptionController; composing options
GitOrigin-RevId: 1ef89dce3166f99847ed86263d3a58f3efa0fd03
2022-12-22 21:07:34 +00:00
Tagir Valeev
fa3cf18c12 [inspections] OptPane: use stringSet
GitOrigin-RevId: 7f3ba5c990d8aa173d8edf3a38bb21543c26d0fa
2022-12-21 19:22:09 +00:00
Tagir Valeev
9847ad11f0 [python] Migrate inspections to OptPane
GitOrigin-RevId: ee8056bff9fad8b0d9874028a36f79400b3315d8
2022-12-18 13:58:46 +00:00
Alexey Kudravtsev
4517d3cad6 reduce classloading footprint of intention actions
GitOrigin-RevId: 024a247ccfe8c7a0402997f6f76fbf435773fa2b
2022-12-15 15:29:03 +00:00
Tagir Valeev
6328482822 Fix warnings
GitOrigin-RevId: bbcd9cb2571a94c6c20b9e8b6bf70c52dc87a70e
2022-12-13 18:59:17 +00:00
Tagir Valeev
6d23486911 [inspections] Use getOptionsPane()
GitOrigin-RevId: 9c5a7cbbf569d13ff16ae3597df14d369cb86be9
2022-12-11 13:00:35 +00:00
Alexey Belkov
80f9c9f8d0 Fix simple "Constant conditions" warnings in Kotlin
GitOrigin-RevId: 0996f9afd1586efc7fd6cc25ee207e26be126a20
2022-12-09 15:29:45 +00:00
Tagir Valeev
5951e2a151 Fix constant values and other warnings
GitOrigin-RevId: a465f651f31462942780f5238a7c3bd1925ec4be
2022-12-08 10:10:07 +00:00
Mikhail Golubev
5e868d4eba PY-54336 In case of unresolved return type annotation assume that method returns Any
_T_co in itertools.product declaration in Typeshed used to be imported from
_typeshed/__init__.pyi stub and was not resolved as a name starting with
an underscore. Nonetheless, its method __next__ was still recognized as generic
because _T_co used in typing.Iterable.__next__ was used instead thanks to
PyAncestorsTypeProvider. In other words, we inferred a TypeVar as a return
type of a method of a non-generic class. It led to retaining this TypeVar as-is
(not replaced) after substitution and SOE further down the road.

Ideally, the same should be done for other places where type hints can be used,
e.g. if a local variable has an explicit annotation, even an unresolved one,
no other type sources should be examined. Unfortunately, it's not as
straightforward for variables and parameters since their annotations sometimes
don't contain a type, e.g. x: Literal = 5, or x: Final = 5. It means
that we need to distinguish somehow between the cases "incorrect annotation, use Any"
and "this annotation requires further inference for the assigned value", and
our API doesn't allow to express that at the moment.

GitOrigin-RevId: 1bba57bb38718bcab7778049a91d5cbffb5e87c2
2022-12-07 19:04:56 +00:00
Mikhail Golubev
36ff257cd4 PY-54336 Properly protect against recursive substitutions in generic types
The original problem was seemingly fixed by the recent sync of Typeshed
(see 1b80465a7c72f89f48b22d35b69e4da4ea1efd46) where the declaration of _T_co
used in itertools.product.__next__ was moved from from _typeshed/__init__.pyi
to itertools directly.

The SOE was caused by the fact that due to unresolved _T_co in itertools.pyi
we retained _T_co type var in the result of product("bar", "baz") call. Then,
as a value of type list[_T_co] was passed as an argument to
list.__init__(self, __iterable: Iterable[_T]), we formed a mapping
{_T -> _T_co}, but the definition of list[_T] inheriting from Collection[_T_co]
itself added a mapping {_T_co -> _T}, hence we got a cycle.

The right way to handle such cases is introducing scope owners to TypeVars,
as it's being done in PY-53896, so that we can distinguish between _T_co's
coming from different class declarations, i.e. Collection:_T_co and product:_T_co.
Having a recursion check as a safety net is still beneficial, though.

GitOrigin-RevId: 7bebbe14931d44b12bc778f449f854d328169450
2022-12-07 19:04:53 +00:00
Alexey Kudravtsev
39315cf556 remove redundant unmodifiableLIst warnings since Container.map is/will return umodifiable list already
GitOrigin-RevId: ce44abf3ca5c7ee8eb5ac960ca0e7dc94fb71562
2022-12-07 17:44:11 +00:00
Alexey Belkov
390ba59bc2 Fix spelling of "quick-fix" phrase in messages
It should be hyphenated: https://www.jetbrains.com/help/idea/resolving-problems.html

GitOrigin-RevId: a3cc01babc32c3edfbe59594fa3756a415cc169b
2022-12-07 15:26:37 +00:00
Tagir Valeev
a8b394e10c Fix constant value and other warnings
GitOrigin-RevId: 5521a732a94fb9c8ee55e6487e306392d53173bd
2022-12-05 16:50:45 +00:00
Andrei.Kuznetsov
cdea2c52ca Restore backward compatibility of FilePropertyPusher: getFileDataKey should return Key
Otherwise, existing plugins will not be binary compatible with the new platform.

GitOrigin-RevId: 7e9ca0b981b37ba3e85115d7c4b96a983ba9b480
2022-11-29 21:18:51 +00:00
Alexey Kudravtsev
b2996cda44 deprecate ContainerUtil.newArrayList(Object) to prefer more immutable List.of()
GitOrigin-RevId: 7aadc5db58512750fbf47563df2d77f9be4c6e83
2022-11-28 19:58:14 +00:00
Daniil Ovchinnikov
9bbb7c809f add missing @JvmDefaultWithCompatibility annotations
GitOrigin-RevId: 37a2d4e38688a52597cc2e24c96c953738c4e0cf
2022-11-24 21:23:30 +00:00
Elena Shaverdova
21c45f9e88 Revert "Revert "PY-53631 PyCharm 2021.3 indexing files/folders/symlinks in excluded folder""
This reverts commit a6547911f146ecd016a3e6e671ea3a698ce58b2f.

GitOrigin-RevId: 23fff5b8836dec24141492cc6720e0571ff81e52
2022-11-24 21:06:57 +00:00
Elena Shaverdova
6ba1481632 Revert "PY-53631 PyCharm 2021.3 indexing files/folders/symlinks in excluded folder"
This reverts commit 855d4b91a01e10930d7ea07a39f0a0763fbab25c.

GitOrigin-RevId: a6547911f146ecd016a3e6e671ea3a698ce58b2f
2022-11-23 22:28:22 +00:00
Elena Shaverdova
342033006d PY-53631 PyCharm 2021.3 indexing files/folders/symlinks in excluded folder
GitOrigin-RevId: dcc3663987520411771a5fd92421d0c797ca6711
2022-11-23 12:45:54 +00:00
andrey.matveev
91b3e6051c PY-16622 Fix Enum instance causes .value to be incorrectly interpretted
GitOrigin-RevId: e181b2d71eff98bb48936a0bcce9075aaba6e0a7
2022-11-23 10:03:19 +00:00
andrey.matveev
5d0d911428 PY-55734 Fix IntEnum value type inference
GitOrigin-RevId: cd84da49568489110c2c402efda33b633a010be1
2022-11-23 10:03:16 +00:00
lada.gagina
293bb95998 Sync with typeshed @ 460537c7f69ea36aa9ad12ca1bfb48ea56239462
Fixes PY-53839, PY-56090, PY-55053, PY-57120, PY-53965, PY-56368, PY-54532

GitOrigin-RevId: 1b80465a7c72f89f48b22d35b69e4da4ea1efd46
2022-11-21 14:46:32 +00:00
Andrei.Kuznetsov
3d5439e7a5 IJP-1342: Advance persistent file attribute version for each pushed property
It is true, that in most cases storage format didn't change. Still some changes preset: e.g. PythonLanguageLevelPusher changed attribute type from string to int (enum). To stay on the safe side, we update all the attribute versions.

Also note that FilePropertyKey does not put references to original type to user data (e.g. instead of LanguageLevel it will be int or string). No special care is needed to make plugin unloadable in this case.

GitOrigin-RevId: 439eae357778e9c827b5a1a9ad2a79f9a3c9e3a7
2022-11-17 18:56:14 +00:00
andrei.kuznetsov
21de7c822c IJP-1342: Use FilePropertyKey in pushers
GitOrigin-RevId: 4801d976d564f2c82839c10c0b8955e6af9d4fad
2022-11-17 18:56:07 +00:00
andrey.matveev
531c8dbdef PY-36158 Add all star import sources if imported element qname not locally resolved
GitOrigin-RevId: 0f65429042ebde43cbf04ec66abf6f392e71ae67
2022-11-17 16:56:01 +00:00
Alexey Kudravtsev
c7d42826db add correct wildcards to method signatures
GitOrigin-RevId: 9534fb26e3f625a097c747938c564800895c14b5
2022-11-17 13:44:42 +00:00