Commit Graph

811 Commits

Author SHA1 Message Date
Daniil Kalinin
dda63f05d8 PY-40313 Fix for "Python string literals in Markdown documents are treated as 'bytes' for type-checking purposes"
(cherry picked from commit 2a423d0fbbf4524844c52189a6be4cf9f43f7407)

IJ-CR-18590

GitOrigin-RevId: 33739b79cb8bc76c447d69080940985f431641dc
2021-12-27 09:25:39 +00:00
Semyon Proshev
d09cfa814b Sync with typeshed @ 48f13e451a3ef21002cca3f3b325ff3635f32d66 (PY-41510)
GitOrigin-RevId: b758ee90685ea9ad1e70cd8df2ea92afcb3f0f35
2021-12-24 13:26:30 +00:00
Anton Bragin
98bc6912c8 DS-2826 Extended completion is enabled for Jupyter notebooks
The original fix targeted Web2Py support which is now discontinued (see PY-10145 and PY-49195).

GitOrigin-RevId: 7a6edcf04d04f14317582cd35b4e61813285f710
2021-12-12 16:50:04 +00:00
Elena Shaverdova
77805c73c1 Switch DumbModeTask merging policy from equivalenceObject to tryMergeWith to increase flexibility
GitOrigin-RevId: f6211804ccf1d48e417b3b4c84f84c2789c4e3b2
2021-12-08 20:45:03 +00:00
Alexander Bozhnyuk
82a71bcc5c DS-1131 Moving to intellij.python.psi.impl and writing tests.
(cherry picked from commit 28cbf907a7be647fb7fbb4b7fdf822ce36303283)

IJ-MR-17101

GitOrigin-RevId: 70cbab8656c0c9d81e8cf870b699a49c8b12b74e
2021-12-02 21:13:07 +00:00
Irina.Fediaeva
1514f90381 Fix null progress indicator
(cherry picked from commit ed9a2294cd3c1b603e348b5b7492765904164d52)

IJ-CR-16877

GitOrigin-RevId: ba7cf6a7f2a9274cf3cca30b1cd7c18653248553
2021-12-01 10:26:51 +00:00
Irina.Fediaeva
b26a672d9e PY-51209, PY-51545: Update docstring formatting helpers to Python 3.10.
Old helpers are completely broken for reST, Google and NumPy docstring formats.

(cherry picked from commit 9ce7f986164ca7a61710eefab38934837a36f00b)

IJ-CR-16877

GitOrigin-RevId: 34f27150854279ba98afb8bb23711e8a62fa58c0
2021-12-01 10:26:49 +00:00
Mikhail Golubev
62e6051ffe PY-51801 Explicitly re-push language level in content and source roots on SDK change
Previously, we erroneously relied on UnindexedFileUpdater to rescan module
roots for us and push a new language level to the files inside them.
Its behaviour has changed in 2021.3 to rescan only SDK own roots on its
change, leaving project sources to specific FilePropertyPusher implementations.

Co-authored-by: Shaverdova Elena <elena.shaverdova@jetbrains.com>
Co-authored-by: Semyon Proshev <semyon.proshev@jetbrains.com>

GitOrigin-RevId: 866d902bc23ac8886f87312174c2717710072dd2
2021-11-29 22:12:29 +00:00
Mikhail Golubev
39bbee316d Remove a redundant StringBuilder usage
GitOrigin-RevId: 7a8c16954149952c7425e34c4377c7bde8eff254
2021-11-29 22:12:28 +00:00
Daniil Kalinin
6a0f77c6ab PY-35936 Allow formatter to fix "PEP 8: E701 multiple statements on one line (colon)"
(cherry picked from commit e955950c3d09fee9d816147a9e951af6cee53ae0)

IJ-CR-16824

GitOrigin-RevId: 0fa973ad2868e9388515d36a4f57f4ae3a28c4e3
2021-11-24 08:40:24 +00:00
Semyon Proshev
34baf00129 Remove support and tests for tensorflow >= 2.0.0a0, < 2.0.0rc0 since these packages are no longer available
GitOrigin-RevId: de628547191998ab50f1d3c9a11504151c3cbf5d
2021-11-23 19:29:56 +00:00
Mikhail Golubev
4625aad294 Take into account await expressions in the operator priority table
GitOrigin-RevId: 8cf11da7e2e58fef82472d034ae7c1ddf9f7794e
2021-11-23 12:34:19 +00:00
Mikhail Golubev
f8aecd088e EA-401551 Fix an exception when joining IFs with assignment expressions
GitOrigin-RevId: ce9610afb4e280b2930f126861bdaf13bd69021e
2021-11-23 12:34:18 +00:00
Mikhail Golubev
b55d2679cc EA-401551 Cleanup in PyJoinIfIntention
GitOrigin-RevId: da1d8414dfe985118201cf219f3d55225e5f7ae9
2021-11-23 12:34:16 +00:00
Mikhail Golubev
4dbe727d87 EA-404000 Fix NPE in case of unresolved class names in class patterns
GitOrigin-RevId: c1805f264367e026c22b12a714eb97b6acd8edec
2021-11-23 12:34:15 +00:00
Mikhail Golubev
a5d9ceb883 EA-404126 Add diagnostic
GitOrigin-RevId: 55e7c7e236287200b4d1f493be2bb8db5b764067
2021-11-23 12:34:13 +00:00
Petr Golubev
7c6ad9c669 IDEA-281472: restored LanguageCodeStyleSettingsProvider.getIndentOptionsEditor()'s signature for binary compatibility
GitOrigin-RevId: d791d2367704984f13a26012824bd1606825aa19
2021-11-19 19:57:37 +00:00
Lada Gagina
315f1905fd PY-46344 Import abstract base classes from collections.abc, not collections
GitOrigin-RevId: d4b7165f09f47c7cca6c3eb47b1e254e5b855b40
2021-11-19 12:04:44 +00:00
Mikhail Golubev
532525beaa PY-29257 Don't replace non-free type parameters of generic type aliases
GitOrigin-RevId: 4024a7377224f4387b9bd9007ff7c6650a7cd3f0
2021-11-17 17:20:50 +00:00
Mikhail Golubev
60942a170c PY-29257 Support generic aliases for tuple types
GitOrigin-RevId: e14ea6196caf4fb8295ff93c02393b1298e39784
2021-11-17 17:20:47 +00:00
Mikhail Golubev
0c6f633632 PY-29257 Simplify handling of different numbers of actual and formal parameters
GitOrigin-RevId: f629f03e5937ba7a671f33eeeb3d7d5d2e353900
2021-11-17 17:20:45 +00:00
Mikhail Golubev
b5c606402b PY-29257 Update the PR for the API introduced for ParamSpec, add more tests
GitOrigin-RevId: 3056d1f82db91b98f92f435070260217bf950c8b
2021-11-17 17:20:42 +00:00
Wannes Sels
bd29a10e6d PyTypingTypeProvider fixes for nested generic types and for generic types in Unions (PY-29257, PY-49582, PY-29564)
closes https://github.com/JetBrains/intellij-community/pull/1655

GitOrigin-RevId: 8bb8e0c8a53176eabb715aacc289bc83bdb01d8c
2021-11-17 17:20:40 +00:00
Alexey Kudravtsev
8f8b06b9a6 there's no sense in storing null values in a weak map
GitOrigin-RevId: d28cc3cb1941e990a847ec51e08e1fa2faac1482
2021-11-17 16:18:38 +00:00
Yann Cébron
0e5ecdc64d PyAnyExpressionEvaluator: javadoc typo
GitOrigin-RevId: d0baad205683422d7fbec323424a7022fa3caf08
2021-11-16 16:04:11 +00:00
andrey.matveev
30d0fd71ad [PyCharm] Fix UnusedPropertyInspectionTest delete unnecessary QFIX.define.attribute.in.init
https://buildserver.labs.intellij.net/investigations.html#testNameId5820486536545895157

GitOrigin-RevId: e0c96746015539a61c7ff0f44712c34a9fdbd351
2021-10-21 07:46:18 +00:00
Aleksei Kniazev
cee35d1968 fixed collection initialization for PyDecoratorStub (PY-50382)
(cherry picked from commit df397bb6b705820b86c59a51d3cf7f14983ef746)

IJ-MR-15304

GitOrigin-RevId: 90422fda4c9575877fc79f4e7854c56fe0a56e6f
2021-10-18 20:56:08 +00:00
Aleksei Kniazev
148de99d24 tolerate nulls as positional arguments in decorator stubs (PY-50382)
(cherry picked from commit 1249b90357e2f9da486440f7a3f569f34cca3d5b)

IJ-MR-15304

GitOrigin-RevId: 3a3b7a1fe8708dc9eb58333e9c96c7eb67ea8455
2021-10-18 20:56:04 +00:00
Aleksei Kniazev
67caf6fc19 review fixes for endpoints for python (PY-50382)
(cherry picked from commit 76937e4de07193be94e352086ced5554029300e2)

IJ-MR-15304

GitOrigin-RevId: fe3c12aba62e46627ebd4d6a446a1b02a072c87e
2021-10-18 20:56:01 +00:00
Aleksei Kniazev
f8c2ad4f8a arguments literals are now stored in python decorator stub (PY-50382)
this makes accessing decorator arguments possible without needing to parse the file again

(cherry picked from commit a9854dbf181f3c7bf488d6ecc18205bb29df2422)

IJ-MR-15304

GitOrigin-RevId: 1031d888a4a08a706c4fa9e2dc48e2f97462c95e
2021-10-18 20:55:54 +00:00
Semyon Proshev
ae73545b30 Apply API changes planned for 2021.3 (PY-43884)
Only the ones have no usages.

GitOrigin-RevId: 48270979f03b3a7ebbf9c5ed555d098edd66d1ab
2021-10-18 16:33:54 +00:00
Semyon Proshev
59a6eeaae4 Sync with typeshed @ 53087be4eb935e5db24e9dddad3567ecaf1909a7 (PY-41510)
GitOrigin-RevId: 37ee52ec2d883d8bbf244e4d1a871cde7f678d17
2021-10-18 16:02:12 +00:00
Mikhail Golubev
e9d11d1215 PY-48010 Warn about problems causing SyntaxErrors in PEP 634 patterns
GitOrigin-RevId: 718645cc5dfd6d0a14f1bd802f3c5bb2bb2c6074
2021-10-18 13:57:02 +00:00
Mikhail Golubev
0686325b90 PY-49774 Warn about PEP 634 match statements in Python < 3.10
GitOrigin-RevId: 092f708faf2f35454a8214e56c2dfd6ab43b3e27
2021-10-18 13:56:58 +00:00
andrey.matveev
7ddc12fc99 PY-50337 Fix bitwise or union with not calculated generic unions
(cherry picked from commit 8123c748df12a15c4a30460057ac593c339cf6d8)

IJ-MR-15000

GitOrigin-RevId: faeeae06715ebed84111008581a2926b877f97f0
2021-10-18 10:04:46 +00:00
Mikhail Golubev
4582894569 PY-50943 Fix NPE caused by now null-hostile immutable collections in PyNames
I also went through other places where these collections are used and updated
them where needed.

GitOrigin-RevId: d74bcea57e0ab71273837e3c443b600bfd64ff3b
2021-10-16 09:04:24 +00:00
Mikhail Golubev
1421975c96 PY-48012 Resolve and complete attributes in PEP 634 class patterns
Both are implemented other the type of the corresponding class.
References resolve to any readable attribute of a class, however
some obviously wrong variants such as special "dunder" attributes
and methods are intentionally excluded from completion suggestions.

GitOrigin-RevId: 5edac14f47cba39840b15b0dd7f21e2e46077261
2021-10-15 17:36:56 +00:00
Alexander Bozhnyuk
3c9ef10378 DS-1865 Fixing the problem with "Import this name" action.
Fix for problem 'Quick fix "Import this name" do the same as "Import into current cell", but should import into the first cell'. Not it does import to the first cell after existing import.


GitOrigin-RevId: 3ecbcad40d662563a28874bcf402c2cfa104cf47
2021-10-15 13:55:36 +00:00
Irina.Fediaeva
6c243ee77f PY-50769: Make python completion contributors DumbAware
Completion contributors already wrapped in `DumbModeAccessType.RELIABLE_DATA_ONLY.ignoreDumbMode` in `CompletionProgressIndicator#calculateItems` so we don't need any extra-wrappings to prevent IndexNotReadyException

(cherry picked from commit 83c120ed2502474f3ddcfa2a52c6e9552d02e55e)

IJ-CR-14512

GitOrigin-RevId: e806ecb879708a75a8e7f544ea6d16a0648ca069
2021-10-14 08:38:49 +00:00
Alexey Kudravtsev
8cfaa50a8c reduce unnecessary usages of LocalInspectionSession to avoid instantiations to better encapsulate its lifecycle
GitOrigin-RevId: 7f4e25682a4b690e42543a662d80542d8fed48c5
2021-10-13 19:00:05 +00:00
andrey.matveev
1156723b14 PY-33055 Fix move attribute to __init__ method quickfix
(cherry picked from commit cd6abb8ad8a01b22066bed85639242b03a85d1d0)

IJ-MR-8050

GitOrigin-RevId: f8a350835ce303c96b7f404263d8367242f4eaa6
2021-10-12 06:16:05 +00:00
Mikhail Golubev
2d2ba280ac PY-50885 Fix CCE when resolving namespace package references in docstrings
GitOrigin-RevId: f8196bd41e5a0a880651fa08d3b6820594cf44b7
2021-10-08 13:00:29 +00:00
Nikolay Chashnikov
9f4e369671 [python] cleanup: delete unused deprecated API (IDEA-271555)
GitOrigin-RevId: 5d0a6f9c6dac057f638efec4b82b7946d5c14f37
2021-10-07 07:55:05 +00:00
Mikhail Golubev
3cfef388ae Stop at PyStatements when looking for a containing type hint
GitOrigin-RevId: d12b04002c8b0a495e59592fe8e60da863d4a3a5
2021-10-05 14:18:01 +00:00
Dmitry Batkovich
3c1933fa52 use DumbModeTask#queue short-cut
GitOrigin-RevId: b7d5ff564618fb8f40d8b44e920daa351a686aa4
2021-10-01 10:00:15 +00:00
Tagir Valeev
81d730447a Add type parameters for raw type casts where it's safe
GitOrigin-RevId: 49c3dd961c5c7122d6644b7e4959d0e86ad271da
2021-10-01 07:59:54 +00:00
andrey.matveev
903f6e11ca PY-27128 PY-48466 Fix problem with imports in PyMakeFunctionReturnTypeQuickFix
(cherry picked from commit 9320c2e708afa2ddd025f60b0c122132387493b7)

IJ-MR-10124

GitOrigin-RevId: 219e646482999e8b81b77aaf52eb24574381af3d
2021-09-20 11:56:03 +00:00
Mikhail Golubev
8362476ad3 Inline two overloads of registerForAllMatchingVersions used only once
GitOrigin-RevId: 80aa55851b69124dc9470aa9eb65cabf464880cf
2021-09-17 18:03:32 +00:00
Mikhail Golubev
284bbcaf42 Give a descriptive name to UnsupportedFeaturesUtil.visitPyListCompExpression
GitOrigin-RevId: 1269a4f6b6e11c6c34012b0d668271acb866378d
2021-09-17 18:03:28 +00:00
Rustam Vishnyakov
b2ee0f87fb Categorise Python plugin components for SettingsSync, disable roaming for local settings
GitOrigin-RevId: c05cf36d042fbac472ba5cc4e6e4d4dc01c802be
2021-09-17 10:02:13 +00:00