Commit Graph

854 Commits

Author SHA1 Message Date
Evgeniy.Stepanov
a59e2445ef [python] Do not try to store module settings if module does not support it, fix RIDER-65749
(cherry picked from commit 176cdfa247412ada05300429cde63a2c8fbb0c3c)

IJ-CR-21584

GitOrigin-RevId: 4ae79745171c032a76d00f79343220ac2e3118bf
2022-03-03 08:40:24 +00:00
Mikhail Golubev
1837cf5e0c Display more information about target expression stubs in "View PSI Structure"
I had to additionally implement toString() for all custom expression stubs
because otherwise the default Object.toString() breaks the platform test
checks on stub tree consistency (new and updated trees have different text).

GitOrigin-RevId: 35cd97df916836d0443b1177bfa5885864010a68
2022-02-25 19:32:05 +00:00
Mikhail Golubev
db8e5c2e2e PY-47962 Start-match non-imported module names in completion
This way we further reduce the number of irrelevant completion items suggested
effectively in every expression context, e.g. not suggesting "parser" and
"calendar" modules for the "ar" prefix, only something like "argparse" or
"array". The same applies to the completion of attributes with unresolved
qualifiers.

GitOrigin-RevId: 7a58053c4744c3d0066c379a4f190ffd09bfabd1
2022-02-23 11:55:19 +00:00
Mikhail Golubev
5ca605ccab PY-47962 Put non-imported module names last among completion variants
By giving them an explicit priority lower than the default. Unfortunately,
it doesn't remedy the problem with short module names, such as "re" or "sys",
always being on top when they completely match the entered prefix.
At the moment this behavior is hard-coded in the platform and cannot be
altered by language plugins. It's not caused by the "liftShorter" classifier.

Also, explicitly prioritizing various lookup elements has become quite messy
and scattered across PyCompletionWeigher and specific contributors. It begs
to be refactored, but will be addressed separately.

GitOrigin-RevId: d6f6ad06f5d68f3de7b866b8240a95b785604649
2022-02-23 11:55:15 +00:00
Mikhail Golubev
ff82f4e058 PY-47254 Don't duplicate already imported module names in completion
By running the completion contributor for non-imported modules after everything
else, including the LegacyCompletionContributor offering names present in
the scope, and filtering out duplicate variants.

GitOrigin-RevId: 98982b2c33d1fc11d70b144de556a6825bd3febc
2022-02-23 11:55:12 +00:00
Semyon Proshev
de4f709c09 Change looking for helper root when running pycharm from sources
It now supports running after compiling with JpsBootstrap that makes another modules structure.

GitOrigin-RevId: d3e3a0598d5cabaa436bc7ce7bfec53b3919343a
2022-02-22 15:29:28 +00:00
Dmitry Trofimov
aacc1d4ac5 Fix messages according to https://jetbrains.team/p/ijpf/reviews/4476/timeline
GitOrigin-RevId: cd390d2c7cf61f43a554d198f98f7375d872ffa5
2022-02-22 11:29:30 +00:00
Dmitry Trofimov
8d6f3c7566 Fix messages according to https://jetbrains.team/p/ijpf/reviews/4343
GitOrigin-RevId: cc2a22c7ff04abc7e5d9b763e1f67ba144d47462
2022-02-22 11:29:28 +00:00
Lada Gagina
c7d12e929d PY-40007 PY-41546 Add completion for keys of dict literals marked as TypedDicts
- in call expressions
- in assignment statements
- in return statements

GitOrigin-RevId: aea2063f7cd7ffc68903c79fa16a25fdf4ff0f8f
2022-02-21 21:13:02 +00:00
Elizaveta Shashkova
b1e8fc9ecb PY-21984 Type Renderers fixes
GitOrigin-RevId: 5911d95d52d994ac4f3e8c514b28f1008b0047e6
2022-02-21 15:44:09 +00:00
Nikolay Chashnikov
3de1d05eec [API] mark for removal API which was deprecated in 2021.2 or earlier and has few usages only (IDEA-281036)
GitOrigin-RevId: 6f1cdecf02dae3ab19351a4fa4e895f98265ea0a
2022-02-17 22:44:08 +00:00
Anton Bragin
f482e9abff DS-3171 Tests for superclass extraction in Jupyter added
GitOrigin-RevId: 32ebd1aaf156413f8f04f11a7a2f3bc1c2c13c39
2022-02-17 20:43:51 +00:00
Anton Bragin
bf28b59725 DS-3171 Extract Superclass works within a single Jupyter notebook
GitOrigin-RevId: eb2e9eb511da8a41e162ff217e23ff8a9d2bf82f
2022-02-17 20:43:48 +00:00
Dmitry Batkovich
7845515960 replace deprecated api usages IDEA-288973
GitOrigin-RevId: 8710623c8abd6f21b49f3e0f7d10639eea8b6170
2022-02-17 11:13:06 +00:00
Mikhail Golubev
3b6dea06a3 PY-21398 Wrap batch updates of existing usages in quickfixes with PotemkinProgress
It also fixes EA-425763 about using incorrect parent and anchor elements
to insert a function generated from a method of a nested class.

GitOrigin-RevId: f9b9da303396eb78c2c12b2750065dbdc0ba70ed
2022-02-17 09:28:34 +00:00
Tagir Valeev
090f452ab0 Remove unnecessary boxing
GitOrigin-RevId: 5b7d8fbfca9d58fcde762c01e564b16be44d9c1f
2022-02-17 05:40:22 +00:00
Tagir Valeev
38bfebaa23 Unnecessary fully-qualified names removed
GitOrigin-RevId: 903dbd15b9f5c307d2e17747a86d5eeecaff144a
2022-02-16 09:35:23 +00:00
Lada Gagina
b8bbabe9b1 Fix code style in PyTypedDictType, PyTypeCheckerInspection
GitOrigin-RevId: fc123ed6304b8e21d3092ed93079b6a450faa237
2022-02-15 16:58:01 +00:00
Semyon Proshev
624dc7823b Reduce code duplication
GitOrigin-RevId: 92d09f2964a28962dd378b2695c5375f1adaa0af
2022-02-14 17:16:11 +00:00
Semyon Proshev
38dd9d9e84 Sync with typeshed @ 7682ae957a32686becaf884de26cf79c9de5b221 (PY-41510)
GitOrigin-RevId: b199b44b7611b70ddc52848dfc4f71684f49e711
2022-02-14 16:49:39 +00:00
Nikolay Chashnikov
abc373560d [API] replace ApiStatus.ScheduledForRemoval annotation by 'forRemoval' attribute (IDEA-288466)
Since we don't want to specify planned removal date anymore, there is no need to use a separate annotation.

GitOrigin-RevId: a047c55475e0f4752a2842577e094fb041c6c05b
2022-02-11 15:12:14 +00:00
andrey.matveev
806fa72b80 PY-51329 Fix problem with overloaded bitwise or operator chains
(cherry picked from commit f265b05500ef8a6b35e7fef090a971f4a5449453)

IJ-MR-17506

GitOrigin-RevId: 5cac0b7d071f753023b97c4e4152acbe388b8f08
2022-02-11 14:18:56 +00:00
Lada Gagina
6f6835f317 PY-46661 PY-43387 Add TypedDict type-checking in return statements, fix tests
GitOrigin-RevId: 6ec55896fce0ff0f40eb66975a7562e4383634ef
2022-02-10 23:02:32 +00:00
Lada Gagina
58815862bd PY-46661 PY-43387 Add type-checking for nested TypedDicts, fix tests
GitOrigin-RevId: c96467c83d7d584bb8a80cdbf2b5faf63735064f
2022-02-10 23:02:29 +00:00
Lada Gagina
72772c55da PY-46661 PY-43387 TypedDict type-checking in call expressions: report value type errors, missing and extra keys
GitOrigin-RevId: ad8c2e37cf893e50aeda7a54d113dec571b0d135
2022-02-10 23:02:25 +00:00
Lada Gagina
bc28fa5645 PY-46661 PY-43387 TypedDict type-checking in target expressions: report value type errors, missing and extra keys
GitOrigin-RevId: 9636c8e032f9d084d7a5c3a8036e54422b8dd222
2022-02-10 23:02:21 +00:00
Dmitry Trofimov
f35438983c CodeServer: support Python inline variable and inline method refactorings
Also decouple BaseRefacgoringProcessor from UI and split usageView into api and impl parts

GitOrigin-RevId: c4c6d9011726d93f0ee6ab4677f7a105c28ec108
2022-02-08 13:31:12 +00:00
Nikolay Chashnikov
b0e823c711 [intellij project configuration] fix format of iml files
GitOrigin-RevId: 8d65ce934d66f057e23e1e4f1f384b5799f151d3
2022-02-08 07:42:10 +00:00
Tagir Valeev
3df143dfe6 Use try-with-resources; other warnings fixed
GitOrigin-RevId: 57e9bbb62af11b0629f9d02534b07e7a921c55af
2022-02-08 06:35:41 +00:00
Dmitry Trofimov
6cfea6e0b5 CodeServer: Python extract method refactoring, also decouple platform Rename refactoring from UI and lang modules
GitOrigin-RevId: fbe188a96f7eeaa168d6acf2874b1b759b9d8791
2022-02-01 19:19:46 +00:00
Alexey Kudravtsev
965f6c769c cleanup: method is identical to its super method
GitOrigin-RevId: 350ea63057fc436a3bcebed964228c43db8d5923
2022-01-27 13:29:12 +00:00
Nikolay Chashnikov
faecb93668 [intellij project configuration] fix format of iml files
GitOrigin-RevId: 9673bc73f6254fa677df806f9c34faafaf5f33fd
2022-01-25 10:44:22 +00:00
Dmitry Trofimov
a9a116522a CodeServer: Python introduce variable refactoring
GitOrigin-RevId: 9404442216786c92508c4a8f4bece96013683083
2022-01-24 19:34:17 +00:00
andrey.matveev
3ae3780538 PY-26881 Fix getLocationString messages
GitOrigin-RevId: 42a5a38b321e8611b9eb466a8cec675cb430cbd1
2022-01-24 05:57:47 +00:00
andrey.matveev
d7e80ec071 PY-26881 Fix getLocationString messages
GitOrigin-RevId: 0e0c11fe297b69dbeedd6516fac8daa79cd6f789
2022-01-24 04:29:25 +00:00
andrey.matveev
0210695327 PY-26881 Use stubs for function in find usages if it exists
(cherry picked from commit 060c164c3f01a857561d5d0341a186464419e845)

IJ-MR-17639

GitOrigin-RevId: 88141ea74ff22fb022056c8d6d7f70222a3f9b74
2022-01-21 03:17:30 +00:00
andrey.matveev
2953318655 PY-38636 Fix go to declaration lead to pyi in some cases
(cherry picked from commit 33b52287f1d5241ee0bc4b8ff1c065e32f26d063)

IJ-MR-18958

GitOrigin-RevId: 5a59d6e6ea3ab001b8237d408340536abe2678e0
2022-01-20 12:03:22 +00:00
Daniil Kalinin
71197da977 PY-27627 Typehints for explicitly parametrized generic class instances
Tests for explicitly parametrized generic class instances

(cherry picked from commit 134748c973843ce8effbf516bbed9be3efbdf8f1)

IJ-CR-18208

GitOrigin-RevId: 0e6c9086964a93cd23385a95d502110c5cc758e4
2022-01-20 07:12:59 +00:00
Mikhail Golubev
753a89ae52 PY-51801 Use the default language level for disposed module SDKs, skip disposed modules
GitOrigin-RevId: edbc870a276a4db8180c5ad0bac3f84599bf7819
2022-01-19 16:04:22 +00:00
Mikhail Golubev
4f1a0a1bae PY-51801 Re-use already collected module SDKs in PythonLanguageLevelPusher
GitOrigin-RevId: 2ea4783d4e7445d1adb9d513e4816bb6778cbe95
2022-01-19 16:04:19 +00:00
Mikhail Golubev
5d2c2c2471 PY-51801 Remove a stale TODO
GitOrigin-RevId: e6331676c54b14e38ab0445105ed877ff10f81c9
2022-01-19 16:04:16 +00:00
Vladimir Krivosheev
5d15210c4b cleanup
GitOrigin-RevId: 50e365d6de18011536dd13e1425c1360505c472a
2022-01-18 07:47:09 +00:00
andrey.matveev
d667021b15 PY-50930 Support ParamSpec from typing_extensions
(cherry picked from commit f2dee2fbe6aa66e14d5130f4910458b6332987d9)

IJ-MR-19113

GitOrigin-RevId: 87cfc35eb79dd11393390046d2401a1fa4d9acba
2022-01-13 07:35:57 +00:00
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