Commit Graph

4285 Commits

Author SHA1 Message Date
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
Ilya.Kazakevich
9214f0d529 Remove IronPython tests: nobody uses it
GitOrigin-RevId: 27d1b005d84e43cfc5fa831111aebcf1c65637b1
2022-01-19 14:49:27 +00:00
Peter Gromov
ba53b24979 [grazie] skip warnings in code-like contexts in all domains (GRZ-285)
GitOrigin-RevId: 053c3549c11e04209c0caaaad948af508f17fa9f
2022-01-14 14:26:13 +00:00
Bas Leijdekkers
ce078dac32 RegExp: new "Regular expression can be simplified" inspection (IDEA-286122)
Supersedes the "Asterisk closure can be collapsed to plus closure" inspection which was only available in PhpStorm

GitOrigin-RevId: a63c6fce88b3700cc521e8b113069a4b2b50a3e4
2022-01-13 20:26:25 +00:00
andrey.matveev
07ebb19aee PY-33843 Fix problem with extracting constant from comprehension
(cherry picked from commit 72bb8e523471c9922ae3d8f95f7fa9ce1fe0009d)

IJ-MR-18836

GitOrigin-RevId: dadb7cf489a0501b834cff7e10979fab2c8ae8cd
2022-01-13 07:40:36 +00:00
Daniil Kalinin
e7421b36cf PY-12106 Add newline when moving function to new file
Update all the /refactoring/move test sources according to the new rule - an empty line is always added after the move

(cherry picked from commit c00d1a499fb9849650eb102dd8bb5380165a1eee)

IJ-CR-17177

GitOrigin-RevId: d436af21c20ddd08b78886a333e6f98c71bcc19b
2022-01-10 09:40:19 +00:00
Semyon Proshev
d09cfa814b Sync with typeshed @ 48f13e451a3ef21002cca3f3b325ff3635f32d66 (PY-41510)
GitOrigin-RevId: b758ee90685ea9ad1e70cd8df2ea92afcb3f0f35
2021-12-24 13:26:30 +00:00
Daniil Kalinin
2647a25fd7 Fix for the broken test affected by 86861f573d66abd3d9100de1ebed59513838a24d
GitOrigin-RevId: 4e6d81aeccaee471568b0cff57aaba4876df0664
2021-12-16 11:22:27 +00:00
Daniil Kalinin
890f04e881 IJ-CR-16991 Highlight all parameters from the outer functions as parameters, not only self exclusively
Added test for this case

(cherry picked from commit 4019a7deb4b577eb6a42200fa4758a2624e26896)

IJ-CR-16991

GitOrigin-RevId: 86861f573d66abd3d9100de1ebed59513838a24d
2021-12-16 10:36:47 +00:00
Semyon Proshev
574a315230 Use proper type eval context while looking for callees (PY-52034)
Otherwise PyTargetExpressionImpl.getType can not infer type for a qualifier defined inside function body.

GitOrigin-RevId: 75345218653fc8507cc31498fda7b8f07d4c02c6
2021-12-10 13:47:33 +00:00
Daniil Kalinin
a83b789054 PY-24653 Fix Self highlighting in nested functions
(cherry picked from commit fbfc5683399723ac0d49e5aa337024154dd6d3a9)

IJ-CR-16991

GitOrigin-RevId: 69084562247b0105f268fac9f442e02756240173
2021-12-06 08:50:49 +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
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
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
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
KotlinIsland
119696be41 Add language level for Python 3.11 (PY-51300)
GitOrigin-RevId: bc2fd30744ca9c2a8023c718ade4689bfc9fef9b
2021-11-17 15:31:59 +00:00
Egor Eliseev
69b843ed0b PY-28563 "Set value" doesn't work
(cherry picked from commit 0c42984de25e97e748e719dccfe3657fc4eb79f1)

IJ-CR-15473

GitOrigin-RevId: 93090f9d81d14009120682796c11862dbe9e3e98
2021-10-26 11:28:52 +00:00
andrey.matveev
f4e98200ee PY-16221 Impl moving add from future imports when move
(cherry picked from commit b1cd64885d96c560976a29db9f5625a29df6d6ef)

IJ-MR-14916

GitOrigin-RevId: 5439442556b3d8ea2680d833109ac86559b765c1
2021-10-18 16:30:24 +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
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
Irina Fediaeva
086905baef PY-23831: Add imports for references from type hint comments during 'Move' refactoring.
(cherry picked from commit c4e5e33459d273b159760a45f528ff1d38c55add)

IJ-CR-13802

GitOrigin-RevId: 3e78b51151d9803e870164c1f2d3d783c61071f7
2021-10-16 07:08:19 +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
andrey.matveev
aa5eb8dc43 PY-23500 Impl considering dependencies for introduce constant fix
(cherry picked from commit fe2adaeabbf1862c2f51a93df14995264a251cca)

IJ-MR-5221

GitOrigin-RevId: 08d0db849d31cdf7684a1b7a68d68072cc0d3686
2021-10-12 17:44:11 +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
Pavel Bakhvalov
105415f0c0 [Grazie] Migration to LanguageTool 5.5
IJ-MR-14886

GitOrigin-RevId: 5a79f2eb654448f9c9e3ab780a9cd8afe37608cb
2021-10-04 19:28: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
Ilya.Kazakevich
9891e44aeb PY-38477: Use quotes around the -k.
For cases like -k `spam not eggs` we need to add quotes.

GitOrigin-RevId: baa135e8cdd0f1a1e019406c0581ea6a8a86e1de
2021-09-17 14:51:07 +00:00
Ilya.Kazakevich
76a3c98f74 PY-46408: Support tests in `__init__.py`
``spam.Class`` may be class in ``spam/__init__.py``
See PyQNameResolveAndSplitUtils.kt

GitOrigin-RevId: a7ec7ddc4c3fa4e6140417c852c385a41be59695
2021-09-16 20:47:51 +00:00
Kazantcev Andrey
448901b1a8 Allow any forward reference in pyi file (PY-49004)
GitOrigin-RevId: 8ea3b8e9e9dbc4e26b274663231d531dc22fcdcc
2021-09-14 18:31:12 +00:00
Semyon Proshev
96ca67b701 Remove support for buildout (PY-49193)
GitOrigin-RevId: 6c9e582d92b7c1c5f43648022abe315906e2786c
2021-09-14 17:08:51 +00:00
Ilya.Kazakevich
05127f6e7d PY-49932: resolve elements with same names in tests: support case when folder and file have same name.
GitOrigin-RevId: 090a86cd58c51636f0a3fb39220cc55e0b64ed98
2021-09-13 16:25:19 +00:00
Ilya.Kazakevich
3e0f3fb205 PY-49932: resolve elements with same names in tests
GitOrigin-RevId: a8b0bcd76c92f12372e2b34dc467396423495246
2021-09-03 19:16:00 +00:00
andrey.matveev
1fe7e5443c PY-49283 Add quick fix for from future import annotations
(cherry picked from commit 7d26e211c67f2574078e1f0e8951f744889d82d6)

IJ-CR-10316

GitOrigin-RevId: 34d4bc72b11613c0603587c1c0a9e640b0add023
2021-08-30 20:48:41 +00:00
andrey.matveev
db3c146388 PY-49288 Hide convert collection intention in annotations and type comments
(cherry picked from commit b402f90ab8687a723e649b9fa792a9c66565d807)

IJ-MR-10422

GitOrigin-RevId: 4b29bc80acc2b025c9261af40d5eb0b4d15776cb
2021-08-30 19:58:02 +00:00
andrey.matveev
781d56deec PY-49935 Fix test after fix internationalization for type hints illegal first parameter
GitOrigin-RevId: 75e9239648869c264b242841fdd53486377a0e71
2021-08-25 09:57:49 +00:00
Semyon Proshev
8b66c62dce It is not enough to process dataclass.field call type since default_factory could return forbidden type (PY-46653)
GitOrigin-RevId: 6fab015ce4bbf8105482d14184cddb9f0cd51685
2021-08-24 12:16:31 +00:00
andrey.matveev
997b58df49 PY-49935 Impl type inference and type checking for PEP 612
Support type hints and type checking for typing.ParamSpec and typing.Concatenate

(cherry picked from commit 7854b3386ccdffc0091664e0923622cd8c093fc9)

IJ-MR-12970

GitOrigin-RevId: 4578cb463b6ab8fc244766bfaccb122d0e2b7479
2021-08-23 17:52:45 +00:00
Mikhail Golubev
d1066811a7 PY-47941 Add a test on completion of pytest.mark
The problem itself was fixed together with PY-48219 by switching to types to
find possible attributes of a module/package.

GitOrigin-RevId: 587b1c96610375836417655f0feb74f38edb4c69
2021-08-23 10:14:16 +00:00
Mikhail Golubev
6726f799ad PY-48198 PY-48220 Use PyResolveImportUtil to find not imported modules for completion
It allows to properly take into account .pyi stubs for module and packages and
find namespace packages in addition to ordinary Python packages as both of them
don't get into PyModuleNameIndex.

GitOrigin-RevId: 4afdf6d61e1f2e426ce65b0d04c6727caaeada2b
2021-08-23 10:14:13 +00:00
Mikhail Golubev
7fc1f80e2e PY-48219 Use PyModuleType to get attributes of a not imported module
It gives more accurate results and allows to bypass the problem
of PyFile#iterateNames(), which limits the results by the content
of "__all__" (as the method is used to resolve names in star imports).

GitOrigin-RevId: b19604d9e25a738909a02a1d81e4716675417430
2021-08-23 10:14:10 +00:00
Semyon Proshev
049680d7cf Remove dataclasses.py from test data after enabling corresponding pyi stub from typeshed
GitOrigin-RevId: fbb411d4ee07c3119e9c03892f5b3001d9e44a20
2021-08-19 17:20:30 +00:00
Semyon Proshev
71d889ca13 Put attrs stubs into test data after they were removed from typeshed (PY-41510)
GitOrigin-RevId: 64016bb8141da717fccb2afbd0b508f11ea903ed
2021-08-18 15:24:41 +00:00
Semyon Proshev
7f77fb1c37 Sync with typeshed @ 837b57fdd1a814237ef4b15f6ce19c701303aebb (PY-41510)
Temporarily exclude https://github.com/python/typeshed/pull/4987
Temporarily exclude https://github.com/python/typeshed/pull/5206 from `collections/__init__.pyi`

GitOrigin-RevId: 6146af923d749b0cff56e823101b8f2b8525383d
2021-08-18 15:24:40 +00:00
Semyon Proshev
330811ee98 Move package-specific test data into separate directory
GitOrigin-RevId: 8167ecec5246bed17980c6638e31fa9fc09403cc
2021-08-18 15:24:38 +00:00
Semyon Proshev
7ebb139945 Remove unused test data
GitOrigin-RevId: 854a63b5c83af70685b837bd48d2cebd0d1b42c5
2021-08-17 17:38:50 +00:00
Irina Fediaeva
208337de9f PY-50074: Allow promoting expression to typing.Literal if expected is PyGenericType without bound and its substitutions contains typing.Literal
(cherry picked from commit 7d2b0606884cb8369f23a3c9ff0633fdd3a43bd0)

IJ-CR-12984

GitOrigin-RevId: c803e78ab72cfef09855dd26c9af3ac479eaf30e
2021-08-17 12:48:30 +00:00