Commit Graph

970 Commits

Author SHA1 Message Date
Ilya.Kazakevich
6b7b0b8cdf Use legacy package manager for local condas.
The problem is new tool window not always used, so we need to support legacy UI somehow. It can't be run on top of new logic, hence we fall back to the old conda approach until we get rid of old UI.

GitOrigin-RevId: dcb892718b0daf0bfcdf58e8448d1894ab40e4f9
2022-11-01 16:54:07 +00:00
Daniil Kalinin
c245993809 PY-7758, PY-23859 improvements in Control Flow analysis
Control flow now abrupts on `exit()` and `pytest.fail()` calls

Control flow now abrupts only if class which contains `self.fail()` call contains case-insensitive "test" word in the name 

Merge-request: IJ-MR-96165
Merged-by: Daniil Kalinin <Daniil.Kalinin@jetbrains.com>

GitOrigin-RevId: ea173fdb72a10a373cd95f266ea7589e36545f30
2022-11-01 09:54:20 +00:00
Anton Bragin
a5cf17386d Revert "Id and Todo indexes for local jupyter notebooks (DS-2718)"
This reverts commit d0e13334f66929b3f16289997d25770b21cf0bbb.

GitOrigin-RevId: 0e78d3a9b5a04c85138ba5af935f8d3060a9a1f5
2022-10-25 10:37:02 +00:00
Semyon Proshev
76e197cfe6 Id and Todo indexes for local jupyter notebooks (DS-2718)
Since origin and backed notebooks have different representations,
a separate filesystem called backed.NotebookVirtualFileSystem is implemented to make backed notebooks indexable.

This filesystem mirrors local one providing only directories and ipynb files.
All file events are synced between these FS via NotebookAdditionalVfsEventsProvider.

New NotebookVirtualFileSystem is embedded into code insight via content roots
that duplicate original content roots.
NotebookDirectoryScopeEnlarger is introduced to have correct `Find in Files...` for directory.

Since backed.NotebookVirtualFileSystem does not inherit LocalFileSystem,
NotebookTodoExtraPlaces was introduced to enable Todo indexing for ipynb files.

GitOrigin-RevId: d0e13334f66929b3f16289997d25770b21cf0bbb
2022-10-24 23:36:37 +00:00
andrey.matveev
cad1138e59 PY-53104 Support PEP 673 typing.Self type
GitOrigin-RevId: 8efc65725580510dc3e9a93e1242e1a69032c8f1
2022-10-19 09:45:15 +00:00
Mikhail Mazurkevich
67dcc8eea9 [workspace model] IDEA-300481 Rename com.intellij.workspaceModel.storage.bridgeEntities.api to com.intellij.workspaceModel.storage.bridgeEntities
GitOrigin-RevId: 6a6cefa7605694dfe4b0fe15bc8fc21847d0f9c9
2022-10-18 13:31:11 +00:00
Alexey Sedunov
c443410d79 Django: Extract Django/Jinja2 commons
GitOrigin-RevId: 3f6bb7b7cd80cbf6007e1930d4d018e1b1cff44a
2022-10-16 11:59:01 +00:00
Alexey Sedunov
a7bc6362df Python: Extract template language commons
GitOrigin-RevId: 1919f022b88d2e8ff3a5966a4c836a38d0e3801c
2022-10-15 17:00:22 +00:00
Elizaveta Shashkova
a3af1d900c PY-46053 Huge Parameter Info popup
GitOrigin-RevId: 039b51b225ec6eb20b77305b47cc71d180398c79
2022-10-15 00:15:54 +00:00
Ilya.Kazakevich
ee538772ac PY-35978: support old SDK to new Conda conversion
GitOrigin-RevId: dc4edb65c5eae997ff07e329cd35190309f51e85
2022-10-13 17:03:07 +00:00
Daniil Kalinin
3d3da180b8 PY-24792 Fix for incorrect formatting of a multiline return statements
Fix pycodestyle-violating alignment in multiline binary statements in return and yield expressions
Fix pycodestyle-violating alignment in multiline tuple expressions in return, yield and assignment expressions
Tests for it
Merge-request: IJ-MR-35686
Merged-by: Daniil Kalinin <Daniil.Kalinin@jetbrains.com>

GitOrigin-RevId: 989b4f4aeb61b43d3215a0ad74f7a9d9685464b8
2022-10-13 09:44:57 +00:00
Ilya.Kazakevich
a4dcfdd16e PY-35978: Improve Conda support and refactor other parts to support it.
Each sdk has additional data with flavor and flavor-specific data. For target-based SDK there is also target information. ``PySdkExt`` has extension method that uses this data to execute code on some SDK. For Conda we store path to conda binary and env name.

GitOrigin-RevId: c63b57aac9b5a267b3a6710902670bfe7d10c722
2022-10-12 17:55:25 +00:00
Alexey Kudravtsev
8a6104f6be replace manual asserts with standard assertIsDispatch()
GitOrigin-RevId: 8fb5ef1e28e14a2dc35448f2f2ff3ff59446ad5c
2022-10-08 14:35:12 +00:00
Irina.Fediaeva
cb8edc622b PY-33341, PY-56416, PY-28900: Render attributes and init params description in the class documentation
PY-33341: Now we render the “Attributes” section in the class documentation, it also allows to describe inherited attributes. (Previously we didn’t render it at all)
PY-56416: In the attribute documentation popup we are able to render attribute description from class docstring. (Previously we took documentation only explicitly from attribute one-line docstring)
PY-33341: We render the “Parameters” section in the class documentation for init parameters, described in the class docstring. (Previously user couldn't use class docstring to describe init parameters)
PY-28900: For the init parameter documentation we take the description from the class docstring if init doesn't have its own docstring. (Previously we took parameter description only from init docstring)

GitOrigin-RevId: d67bf49c72cf7a3634805a6e310c943f1ea848d1
2022-10-07 14:42:01 +00:00
Irina.Fediaeva
6155f366c3 PY-55521: Show documentation for targets inside type declaration statement
GitOrigin-RevId: 3f3f2a440b4226f5af8848e75fdbc841b8a7d505
2022-10-04 14:47:05 +00:00
Irina.Fediaeva
181edc5caa PY-50788: Correct resolve for inherited docstring attribute names
Now during resolve if there is no class/instance attribute with appropriate name explicitly in the class, we will try to find it in the parent classes and resolve there.

GitOrigin-RevId: 52ab5f0ad63cba187457ba3db6107997ede33dee
2022-10-03 13:21:34 +00:00
Mikhail Golubev
be2fbcd7a9 Fix a typo in PyPep8NamingInspection
GitOrigin-RevId: 24a679e4fd66bfe4c8f972eb460741a26cf98d63
2022-09-29 21:56:14 +00:00
Mikhail Mazurkevich
21f8a2f42b [workspace model] Deprecate WorkspaceModelTopics methods to subscribe on changes from the storage in favor of the usual subscription to the topic
GitOrigin-RevId: 2c9e025a1c5f78128267f8972cb9206b264dfc77
2022-09-27 16:55:15 +00:00
Ilya.Kazakevich
a62e64c6a9 Deprecate method for finding sdk by path.
Path is not unique, only name and uuid are.

GitOrigin-RevId: 2a7493062cfc6b03e32ee8970515efcdb7c66283
2022-09-26 15:04:54 +00:00
Tagir Valeev
2c8e3a5752 Remove redundant array length checks
GitOrigin-RevId: 3e66d8777e4988e84731ce71083c551788df004d
2022-09-23 20:46:25 +00:00
Tagir Valeev
bddacd6ba6 Enhanced switch used
GitOrigin-RevId: b9a7d5074c4eb10c87bae5c7703b9671eb0f1aff
2022-09-21 10:52:22 +00:00
Irina.Fediaeva
4b1eca9771 PY-43035: Fix multiline sections in section-based docstrings
Now when parse docstring we take into account the block type. For OPTIONAL_TYPE sections such as Returns and Yields we don't require additional indent for lines following the summary.

GitOrigin-RevId: 5dd7adf5f9042204a29b731a3a7379cc3c743af9
2022-09-19 22:02:59 +00:00
Nikolay Chashnikov
0c2dd1eefd [python] cleanup: remove unused deprecated API (IDEA-295370)
GitOrigin-RevId: 35b47e4aea678a95d20f19e3cf66db7196fd9c7b
2022-09-16 12:41:46 +00:00
Nikolay Chashnikov
65b8769078 [python] API: remove 'for removal' flag from deprecated API which aren't going to be removed soon (IDEA-301912)
GitOrigin-RevId: c8d31098d77a0e153a8a67d50253aaa90c5ee98c
2022-09-16 12:41:18 +00:00
Vladimir Krivosheev
0af2e7b5c5 fix - reduce member visibility (public -> private)
GitOrigin-RevId: fe8a4740e27d192798a9fa55ff41112d1b633e49
2022-09-14 15:09:45 +00:00
Ilya.Kazakevich
f71071a634 PY-55110: Support Django project creation on targets.
``DjangoProjectCreatorAndConfigurator`` uses ``PythonTask`` which wasn't aware of targets and cast additional data to the legacy remote additional data -> CCE.

It now provides limited support for targets API, although we better get rid of it and migrate to the native targets api.

Merge-request: IJ-MR-94386
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: 624fed3ff5e64133e6baa665a4a63bbbe1e0c825
2022-09-13 16:13:21 +00:00
Tagir Valeev
96dba3c70c [python-inspections] EA-657059 - IAE: FileDocumentManagerBase.$$$reportNull$$$0
GitOrigin-RevId: 41121836c59691e773add0dffd5d396eebe73665
2022-09-13 12:35:09 +00:00
Tagir Valeev
0b9788793d [python-inspections] PyChainedComparisonsInspection: reuse SetInspectionOptionFix
DontSimplifyStatementsWithConstantInTheMiddleQuickFix was not preview friendly (also did not support undo)
Fixes EA-653089 - SEGSENAE: SideEffectGuard.checkSideEffectAllowed

GitOrigin-RevId: 0a6a3afdd6b96c707ee127b8429ef127afb01954
2022-09-13 12:35:01 +00:00
Tagir Valeev
5929958466 [python-inspections] IgnoreErrorFix: preview-friendly
Fixes EA-659085 - SEGSENAE: SideEffectGuard.checkSideEffectAllowed

GitOrigin-RevId: 738ca33f4e8e542d47f66c9b3bce42b9c0453390
2022-09-13 12:34:53 +00:00
Nikolay Chashnikov
a0de92e1f3 cleanup: remove unused deprecated API (IDEA-295370)
GitOrigin-RevId: 439b59d8cf266e48f703345e656e4f29e617d00d
2022-09-06 12:45:06 +00:00
Pavel Karateev
a47cf9f44e PY-55920 Suggest python-slugify for installation
GitOrigin-RevId: 0ef316336587d73cd2b79f6862635900ecde5fa6
2022-09-05 20:03:33 +00:00
Vladimir Krivosheev
d94266e6c5 get rid of IntStack in favour of fastutil
GitOrigin-RevId: 3807e023514a7c21e43f87875cffc705045c1dec
2022-09-05 10:39:09 +00:00
Mikhail Golubev
48b07b9057 PY-54503 Provide the type of Enum.value when accessed on a type-hinted value
GitOrigin-RevId: b8105d28955d5f25dc07bbafedb410ea5821d8b4
2022-09-02 20:51:07 +00:00
Mikhail Golubev
49f40ec3a8 PY-54503 Provide Any as the result type for Enum.value when we cannot access AST
GitOrigin-RevId: 307b05d8b9910bd37b85898fa82086b10c14a7cb
2022-09-02 20:51:05 +00:00
Mikhail Golubev
59e79c3c7c PY-54503 Provide the result type for Enum[...].value and Enum(...).value
Precise types can be inferred only over AST if it's accessible.

I had to move PyStdlibTypeProvider higher in the provider's hierarchy
so that it could override types coming from Typeshed, otherwise we
infer enum.property type for the "value" attribute.

GitOrigin-RevId: 8727e080cfc06d0edda13eccfd601601dc661da9
2022-09-02 20:51:03 +00:00
Mikhail Golubev
0fc1981b5c PY-53388 Override the callable type for enum.auto() from Typeshed stubs
GitOrigin-RevId: 132e934de4da01983bebc55fcb1d3440d7053249
2022-09-02 20:51:00 +00:00
Anton Bragin
69cdd73cf7 DS-3171 IJ-CR-21022 Code review fixes
GitOrigin-RevId: 02ecb11b49d6061ca077779870e3c6ef4b92d015
2022-09-02 11:20:21 +00:00
Vladimir Krivosheev
c4a36c563d migrate build scripts to coroutines (part 2)
GitOrigin-RevId: ea917d829c52510e91602f27d77ad48e0e3e01ac
2022-08-31 17:22:22 +00:00
Nikolay Chashnikov
2a38cd76a3 [plugins] get rid of usages of DirectoryIndex
DirectoryIndex is an internal API and isn't supposed to be used from plugins. Its API may change while we are working on updating the underlying structures incrementally (IDEA-276394).

GitOrigin-RevId: f87471f9a0352edea82b03d0ca5baad117094a75
2022-08-26 11:17:55 +00:00
Irina.Fediaeva
cce0ef17d5 PY-16760, PY-28549, PY-35743, PY-55609, PY-46654: Correct resolve of class attributes in docstrings
Previously in docstrings we incorrectly recognized references in 'Attributes' section only as instance attribute references. It led to false positive 'Unresolved reference' on class attributes references in docstrings and wrong resolve when using class and instance attributes with the same names. Now we use ReferenceType.VARIABLE to identify both class and instance attribute references in 'Attributes' section and then resolve them with priority of instance attributes. Also fixed wrong resolve of attributes references to constructor parameters.

GitOrigin-RevId: ea10bfb092472c0ab14b77f06efd93093cfcd684
2022-08-25 21:11:57 +00:00
Vladimir Krivosheev
7a8d37f396 Icon class should be not used directly and should be located in ui but not generic modules (part 2)
GitOrigin-RevId: e384c1191db993a22286f1c7f2f6f83e410a4a5e
2022-08-25 12:30:11 +00:00
Irina.Fediaeva
2c35b284f9 PY-21883: PR remarks. Show elements from 'Other Parameters' inside 'Parameters' section in Numpy docstrings
Removed redundant keyword arguments in parameters section, cosmetics.

GitOrigin-RevId: 213132671cc844eb31a168c4e8a17af169d1aac2
2022-08-24 15:20:53 +00:00
davfsa
680913f146 PY-21883: PR. Show elements from 'Other Parameters' inside 'Parameters' section in Numpy docstrings
closes https://github.com/JetBrains/intellij-community/pull/2051

GitOrigin-RevId: 2438d1c9fdf8d90fd2c046c8a9a55c07f6683778
2022-08-24 15:20:52 +00:00
Alexey Kudravtsev
dfc0c7f0a2 cleanup
GitOrigin-RevId: a60377ec87e4ba2344f69b9e8d888972fd5ed201
2022-08-24 12:02:37 +00:00
Alexey Kudravtsev
85895e8989 add more SSR: replace stream expression with ContainerUtil call
GitOrigin-RevId: 629f61b8d4541fb374dedcbbce2964ddb70dfdf1
2022-08-24 11:15:49 +00:00
Mikhail Golubev
68ecd6048f PY-46257 Special-case missing __getitem__ on the "type" builtin
GitOrigin-RevId: ef377cd103b4dd673d426c0f88d3f0bb6bd9d2e3
2022-08-22 17:01:46 +00:00
Mikhail Golubev
4c5d9a3e5d PY-47532 Extract PyDataclassNames containing all relevant qualified names
GitOrigin-RevId: 8c97dcc701db2b0d57d5f5bb5aff7f4ca6033d50
2022-08-18 16:13:22 +00:00
Mikhail Golubev
84c48c48a9 PY-47532 Support new API and namespace of "attrs" package
GitOrigin-RevId: a8a0f909b21cc9f3b95a7b823452599374a943a9
2022-08-18 16:13:12 +00:00
Mikhail Golubev
4964808eb1 PY-47532 Simplify a chain of .let in PyDataclassTypeProvider
GitOrigin-RevId: 4466dd43ef0ae2168bc08699ebbde313a3c55d3c
2022-08-18 16:13:02 +00:00
Alexey Kudravtsev
261f9f8cf6 fix "notnull can't be applied to type parameter"
GitOrigin-RevId: 52fa57547b5af2f89bea35ad3da70aa25e4fe7b4
2022-08-18 15:07:29 +00:00