Adam Hood
6104bb5859
LAB-31: don't exclude non-third-party typeshed libraries from scope
...
* now consistent with comment in the method
* fix accidental completion from typeshed in test
GitOrigin-RevId: d0245a52a8e51e41ef6c350cc2a610cb1e620326
2020-02-18 19:52:39 +00:00
Semyon Proshev
8f58988590
i18n
...
GitOrigin-RevId: c6b70355ca538e522a1b896f412c972fe7aa56e9
2020-02-13 16:19:54 +00:00
Mikhail Golubev
52469c0e22
PY-22045 Do not insert duplicated "from __future__" imports by using the dedicated API
...
GitOrigin-RevId: ac764747c28d3fde2114115c6a900b2a81e63a38
2020-02-10 11:03:00 +00:00
Mikhail Khorkov
aada2d1238
PY-37755 Add type inference for nonlocal/global variables
...
Now nonlocal/global target expressions gets type from its original reference.
GitOrigin-RevId: 2af93318bd0a1e978e9251e38ec2d6b218a021ed
2020-02-05 11:32:10 +00:00
Mikhail Khorkov
5b224d630e
PY-19425 Fix collapse/expand docstring action
...
Fix Collapse/Expand docstring menu action for Python files.
GitOrigin-RevId: afab71575bbb6fdc8e160138e9b4c3387ff0ad88
2020-02-05 11:32:10 +00:00
Mikhail Khorkov
eae34dc336
PY-14844 Add integer suffix support for Cython
...
Cython supports C-style integer suffix (u, l, ll). I added them to Python lexer and annotator checker to highlight them in Python language.
More information:
- https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#differences-between-c-and-cython-expressions
- https://en.cppreference.com/w/cpp/language/integer_literal
GitOrigin-RevId: 97d7bcb19239f931d9ed5e5746aaed84ac09cbc8
2020-02-05 08:01:18 +00:00
Semyon Proshev
e554ef0533
Consider metaclass __call__ as one more possible constructor (PY-17877)
...
GitOrigin-RevId: 2b2a6e8ddf5bde58c628057dc609e63c135430c3
2020-02-04 12:04:59 +00:00
Semyon Proshev
96a915806c
Enable pyi-stubs for several modules and packages (PY-20708, PY-28784)
...
_csv, _curses, _operator, difflib, distutils, hashlib, heapq, operator, pprint, webbrowser
Remove csv tests as they covered python-skeletons (PY-19522)
GitOrigin-RevId: ddeb6e102a908eaf73fe9b679efb11dfd8599cdd
2020-01-31 13:04:03 +00:00
Semyon Proshev
35ba0742ca
Sync with typeshed @ 48d77d5f067144ebca0738882906bb996e0e7ab3 (PY-39848)
...
Excluding https://github.com/python/typeshed/pull/3252
GitOrigin-RevId: bd535fbff565aef2ba42fd99a7d4a5c7f5c770a8
2020-01-30 19:06:53 +00:00
Semyon Proshev
d9756f9e05
Guard against duplicates provided in completion (PY-39956)
...
GitOrigin-RevId: f46c03dcf78b22d2d973a117a20a044bea394acf
2020-01-30 14:07:49 +00:00
Semyon Proshev
03a0dd5f59
Use default value of keys while determining if intention is available (PY-26286)
...
Unify replacing container usages, the only difference in cases was only presence of default value.
GitOrigin-RevId: 17d7aee3be0797956b00fda8d18953243d76297b
2020-01-29 15:36:20 +00:00
Semyon Proshev
f8c683fd2c
Process all reads of particular key's value together (PY-26286)
...
GitOrigin-RevId: d2b56880b023c2ff87decff20bfac3c4713de32a
2020-01-29 15:36:20 +00:00
andrey.matveev
c4950335ac
PY-39607 Add new features for ml completion
...
GitOrigin-RevId: caf60bd52a1872a2eb53f3617a6ffb51b195ff33
2020-01-29 13:41:50 +00:00
Mikhail Golubev
be2d55e603
PY-32123 Ignore escape sequences in raw f-strings by adding special token type for their text
...
GitOrigin-RevId: 0b15201c60ac56daa45f22bb5ff3c1f8836efee3
2020-01-28 16:04:27 +00:00
Mikhail Golubev
1b08c31b77
PY-38319 Escape braces in %-formatted literals when converting them to f-strings
...
GitOrigin-RevId: 70245bd010ff4a57c06532a80d13ef7e83facb0b
2020-01-27 15:04:01 +00:00
Mikhail Golubev
6b36fb041d
PY-24232 Remove escaping from "%" signs when converting printf-style formatted strings to f-strings
...
GitOrigin-RevId: bd19cad899cee5d93c518b76a990a51c7048442a
2020-01-27 15:04:01 +00:00
Mikhail Golubev
c955ffbcc7
PY-39682 Handle union types of qualifiers when deducing FQN for unresolved attributes
...
The underlying problem is that we started to infer a confusing union type
of __init__.py modules found both in site-packages and python_stubs
for such imported packages, but I want it to be addressed separately in PY-39911.
GitOrigin-RevId: 053a4a092ce7fcc71d192dbaa6b1623b82472a17
2020-01-16 08:11:51 +00:00
Semyon Proshev
bbaead5046
Skip empty classes while inspecting fields order (incl inherited) (PY-40018)
...
GitOrigin-RevId: 53ce68c45df4049346c67416d250b2e36e2c762c
2020-01-10 13:09:02 +00:00
Semyon Proshev
f7a9d32840
Better warning message instead of Name 'variable' can be not defined (PY-39866)
...
GitOrigin-RevId: 68ab0989afd535a0f0958028290a021a21794663
2019-12-31 12:33:54 +00:00
Lada Gagina
16be4d1594
IDEA-CR-56349: PY-39404 PY-39594 Fix type inference for TypedDict types
...
* For cases when a TypedDict was defined in a separate file
* Fix race when typing near inherited TypedDict's field
GitOrigin-RevId: e19792592c744e9c5a7a7c00af847296efb11d0c
2019-12-27 10:34:55 +00:00
andrey.matveev
d66e0eec0e
PY-10184 Impl hasattr support
...
GitOrigin-RevId: e5826372ddfe233656097da774d978c57ee54937
2019-12-23 13:08:30 +00:00
Ilya.Kazakevich
6feb35abfb
tests for unittest2 removed (not used anymore)
...
GitOrigin-RevId: 91bb6d580e7527ab69216f1ae4143be065d5bbc2
2019-12-11 13:38:19 +00:00
Semyon Proshev
6144d481b8
Update resolving qname in scope so functions are processed correctly (PY-35881)
...
GitOrigin-RevId: 4949f39dbe340d51e8ffd990c3a02b06d52adf2d
2019-12-11 13:12:09 +00:00
Elizaveta Shashkova
5c67bc0373
IDEA-CR-56419: PY-34555 Clean module flag for child process
...
If a process was started with `-m` key (and converted to `--module` flag), this parameter will be passed to all its child processes. So we need to clear this flag in SetupHolder before patching arguments
GitOrigin-RevId: 00ae0b23fc6107bee75272a03a5bd15ca474fbc7
2019-12-10 15:38:42 +00:00
Mikhail Khorkov
9b3dc939a3
PY-7251 Fix unresolved reference severity in import statements
...
Unresolved reference need to be error highlighted because
module is something certain and unresolved import is error in most cases.
GitOrigin-RevId: b91e54e695b908db193a35378e663288dae90059
2019-12-06 10:07:44 +00:00
Semyon Proshev
2cff147ca9
Provide callable type for resolved dataclasses.replace/attr.assoc/attr.evolve (PY-37678)
...
It is used while inferring call type.
GitOrigin-RevId: 7cab8246784307328c83c956f2d1644a1e4296c8
2019-12-05 14:31:31 +00:00
Semyon Proshev
64470fd40d
Don't add an ancestor's field as a parameter if it was overridden with init=False (PY-35548)
...
GitOrigin-RevId: 75b1a1c3d1852b98a58d066d6380f04e5dd013bd
2019-12-05 14:31:31 +00:00
Semyon Proshev
26d590e73a
Fix processing inherited attributes with defaults provided from decorated methods (PY-34798)
...
GitOrigin-RevId: c4c265201218130ce2cac1611cd514e57d29fd8a
2019-12-04 15:33:19 +00:00
Semyon Proshev
1efa876ad0
Support kw_only in attr.s (PY-34374)
...
GitOrigin-RevId: a8e78103f3373c967cd429b21e0ced0d530b468d
2019-12-04 12:33:00 +00:00
Semyon Proshev
9ef2a6f638
Update parsing of attr.s for all the changes introduced in 19.2.0 and before (PY-36113, PY-38400)
...
GitOrigin-RevId: 11db701c16986bc8704f139f60a85f5b9c32a509
2019-12-04 12:33:00 +00:00
Mikhail Golubev
13b6bac7af
PY-7711 PY-36912 Don't spell check strings containing injections
...
rather delegating to the spell checker of the injected language.
Otherwise, we either just report typos twice (PY-36912) or, worse, report
numerous false positives since we try to apply tokenization rules for Python
to a different language as we notoriously have been doing all this time for
injected regular expressions.
Implementations of spell checkers for other languages such as Java or
JavaScript have been using this policy for ages.
GitOrigin-RevId: d1a2a3d48b7a5efff0dbb32ec2847fba1482f3a8
2019-12-04 12:07:42 +00:00
Semyon Proshev
c2ca6a2804
Update expected modules and their paths for tensorflow >= 2.0.0rc0
...
GitOrigin-RevId: bb599dffcd13d8c232534d276b9c44e2810968cf
2019-12-03 13:14:10 +00:00
Ilya.Kazakevich
9409409a90
PY-17933: Rename refactoring: cannot find reference to attribute defined in another file
...
Code only checked functions. Attributes were ignored.
GitOrigin-RevId: a1792463fa31c55aed469e2e0c60218aceab16cf
2019-11-27 15:10:05 +00:00
Lada Gagina
03b5d990d8
IDEA-CR-55284: PY-38412 Fix unstubbing in case of TypedDict creation with class-based syntax
...
GitOrigin-RevId: 3d165abaa22d6fa31d63964c8a7fa828fdefd1dd
2019-11-26 11:02:56 +00:00
Andrey Lisin
eb956ca29d
PY-38378 PY-38424 Fix updating variables in debugger console
...
We now access the `frame.f_locals` attribute only once. Multiple access leads to the loss of the changes we have made. We also alter the second argument of the `PyFrame_LocalsToFast()` to 1 to ensure that all the deleted variables will be wiped out from the frame locals.
(cherry picked from commit 28abff39b2c37f30651db220e8700032a629ce73)
GitOrigin-RevId: 8514da7ec187c1192ea9cdf851f89f008242fc30
2019-11-25 09:31:23 +00:00
Lada Gagina
0f51507660
Add tests and fixes to TypedDict support
...
PY-38422 Unify warning message for 'clear' and 'popitem' TypedDict methods
PY-38505 Infer proper type for TypedDict subscription expressions
PY-38439 Fix TypedDict consistency check
PY-38415 Fix TypedDict keys order in parameter info
PY-38413 Add * before all arguments in TypedDict parameter hint
PY-38873 Fix detection of TypedDict subscription expression type when value is a dict, Dict or TypedDict
GitOrigin-RevId: 25ff441042f2e2d7791e28632a5016fb367685df
2019-11-22 21:03:15 +00:00
Semyon Proshev
cff3f1f86d
Enable pyi-stubs for os (PY-23258, PY-21395, PY-21394, PY-21397, PY-17420, PY-28984, PY-27584)
...
GitOrigin-RevId: 34ecf07bc68276e62315d01f3c3347f79026ec65
2019-11-20 11:37:02 +00:00
Andrey Lisin
ba365df917
PY-38941 Support debugging of processes created with posix_spawn
...
(cherry picked from commit e55c2168595e22e80a8f95c2e3812cf7f687c31c)
GitOrigin-RevId: 4db4aaaa9ce7198cfb5177bac262f9f72b92cdee
2019-11-19 17:05:35 +00:00
andrey.matveev
d0162ef760
PY-11977 Refactor code in PyClassTypeImpl and Move type check test from Py3TypeCheckerInspectionTest to PyTypeCheckerInspectionTest
...
GitOrigin-RevId: b7ffd64d983af6447fd35495ecf433d23b0d2855
2019-11-19 07:11:28 +00:00
andrey.matveev
fbac792547
PY-11977 Fix warning when passing class as parameter to method expecting fields from meta class
...
GitOrigin-RevId: ec65fbb39ebd8dd23e7f8a71882e7eeb9c283d38
2019-11-19 07:11:28 +00:00
Andrey Lisin
5997fbedf0
PY-38490 Fix debugging when special symbols are in file path
...
(cherry picked from commit c69c6d560f47552b736cd530106447de19e85e90)
GitOrigin-RevId: a29879d863e635020caf4322f8378b5789246a93
2019-11-15 16:31:36 +00:00
Mikhail Khorkov
5ccf34e0cd
PY-16868 Fix test resource file name (move to uppercase)
...
GitOrigin-RevId: 54c571e82f0ebdfa49d9c08555cc21c2dc21aaf9
2019-11-13 05:32:13 +00:00
Mikhail Khorkov
77c8ea0b13
PY-16868 Fix test resource folder name (move to lowercase)
...
GitOrigin-RevId: 9bb22014c09976a5a63ea8b6cdc66b9910cacd37
2019-11-13 05:32:13 +00:00
Ilya.Kazakevich
75291026e7
PY-29614: Subtests are broken when have names.
...
Fixed on teamcity-runners side. This commit updates em to the latest version and adds test.
See https://github.com/JetBrains/teamcity-messages/issues/221
GitOrigin-RevId: 2538e88844be6b0f337983e2629985c872ac4f71
2019-11-12 16:40:42 +00:00
Mikhail Khorkov
403f8d9d8b
PY-16868 Fix test resource file name (move to lowercase)
...
GitOrigin-RevId: 9b94208736d1e06f15d63c64b6a763c54a7bb05e
2019-11-12 11:34:13 +00:00
Mikhail Khorkov
ba25d399f9
PY-1421 Update test data for all 'unused import' inspection report message
...
GitOrigin-RevId: 1f0cbb85d9b062265f2b93e2746c11f8e72b0bff
2019-11-12 10:10:18 +00:00
Mikhail Khorkov
274387096d
PY-16868 Disable property declaration inspection in .pyi file
...
We do not need to check property decorator in .pyi files at all.
GitOrigin-RevId: b0a9e06fd462a518437403193c270700158406c2
2019-11-12 08:31:53 +00:00
Semyon Proshev
8d1b70c5bb
Drop psi builder cache on pushing or popping parsing scope (PY-36167)
...
Since builder could cache something related to the current scope (e.g. token type)
GitOrigin-RevId: ffabda058dac874bd9187fa27d30b823f782fcf6
2019-11-07 02:40:58 +00:00
Ilya.Kazakevich
b4e6e537b6
PY-38775: Generate tests even for empty classes.
...
When user wants to generate test for class ``SpamEggs`` that has no methods:
* For pytest generate "test_spam_eggs" function
* for UniTest "class TestSpamEggs"
``PyTestCreationModel`` also rewritten a little to make it slightly more readable.
GitOrigin-RevId: cc5d774ad684844f5fd9c86634dbcd0d2343437f
2019-11-07 02:40:58 +00:00
Andrey Lisin
a7293b3881
PY-23492 Properly handle percent sign in data frame column names
...
(cherry picked from commit 9e9ca85bb307c9fb784998bc49732b6c2674158b)
GitOrigin-RevId: 9ed3bae6c8776f6be4e504b297e7c0e838420eaa
2019-11-07 02:40:58 +00:00