Commit Graph

5360 Commits

Author SHA1 Message Date
Eugene Petrenko
b0b06a9e32 SdkTypeId - add version string comparator to the API, fix inheritors
GitOrigin-RevId: 4cc18ea990aad56632db714701826f2eaa3d8d05
2020-01-16 08:11:51 +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
Tagir Valeev
78a91459c4 Array annotations changed to type-use style (not compilable now)
GitOrigin-RevId: 68aa4ba200618083684599228e13dfdba35967a4
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
Dmitry.Krasilschikov
5258553cba IDEA-229963 move hierarchy to new API
GitOrigin-RevId: 798ecef34e2e897d36552548f760441a2f7d58c5
2020-01-05 16:03:25 +00:00
Alexander Koshevoy
e3ccf46137 PY-39996 Switch from predefined CredentialsType.Vagrant to VagrantCredentialsType
GitOrigin-RevId: 6a44a75288b1d826163e30e7ab5fc5943a0ee465
2020-01-04 21:22:52 +00:00
Dmitry.Krasilschikov
38f6f13df8 LAB-62 get rid of static *Bundle usages: more fields
GitOrigin-RevId: 69ded152ad5996ae07c45dc4fd6ff20224d25572
2020-01-01 11:03:11 +00:00
Dmitry.Krasilschikov
8718df4f50 LAB-62 get rid of static *Bundle usages: more fields with readable name
GitOrigin-RevId: a57e5216970e96c9e4ff5139ca8f5566835ca2e6
2019-12-31 17:02:19 +00:00
Dmitry.Krasilschikov
81be21f0e8 LAB-62 get rid of static *Bundle usages: more "bundle" fields with readable name
GitOrigin-RevId: 6c3695d146c1a01a904d3231903cf19ceb1f743c
2019-12-31 16:31:26 +00:00
Dmitry.Krasilschikov
925b542280 LAB-62 get rid of static *Bundle usages: more fields - replace getNAME() with more readable getName()
GitOrigin-RevId: 21134371a0a08ffc5f0023fa6551142631625d8b
2019-12-31 16:31:26 +00:00
Dmitry.Krasilschikov
3d68526667 LAB-62 get rid of static *Bundle usages: replace getNAME() with more readable getName()
GitOrigin-RevId: 9fd617248e5b405d2094ce949d1810555e0bf814
2019-12-31 16:31:26 +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
Ilya.Kazakevich
4508e0de9d PY-31836: Use pytest parameter as test name, not keyword.
The correct way to use parameters is to add them to the test name.
"-k" is also works in some cases, but it is not official nor stable.

* pytest runner reports "testname[param]" as metainfo
* we fetch param
* add "parameters" field to the pytest
* glue it with test name

GitOrigin-RevId: 56c5d93fd93a12ba5742b21af51ea04823a9d8f7
2019-12-30 13:34:33 +00:00
Dmitry.Krasilschikov
6676ae39cc LAB-62 get rid of static *Bundle usages: public static final fields
replace `public static final String X = *Bundle.message(...)` with
```public static String getX() {
    return *Bundle.message(...)
}
```

Also, let's mark fields that are used in third party plugins as `@deprecated`

GitOrigin-RevId: b9d42527ed14126b84dca91b837064c306c03177
2019-12-29 19:03:50 +00:00
Dmitry.Krasilschikov
f0a9c5f83b LAB-62 get rid of static *Bundle usages: more private static fields
replace `private static String X = *Bundle.message(...)` with
```protected static String getX() {
    return *Bundle.message(...)
}
```

GitOrigin-RevId: 5de111f477a214e87d22226974c3fdf0e10fcbb0
2019-12-29 19:03:50 +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
Ilya.Kazakevich
820a665815 PY-29154: Return test runner exit code
When test runner returns code > 0 (because of test failure), our runner must do the same.

See issue description for the reason

GitOrigin-RevId: 231c9ab337e80f70872bf6e6f61a397599f18e26
2019-12-23 20:53:08 +00:00
Semyon Proshev
b369994381 No more disregard for unresolved member on None (PY-39078)
GitOrigin-RevId: aa2cb4908b8472905400e11a2f12f3e67556abeb
2019-12-23 15:07:19 +00:00
Andrey Lisin
a22effa122 PY-38347 Fix frame evaluator opcodes to lines mapping procedure
The previous version of the procedure could miss breakpoints when extra `EXTENDED_ARG` instructions are added before the injected code. This happened because in some corner cases after updating the opcodes to lines mapping an `EXTENDED_ARG` instruction could land as the last instruction in a line, and the instruction which argument it extends - on another. This lead to the situation when it was impossible to detect that we have hit the next line. These changes also add the ability to trace opcodes when the `PYDEVD_TRACE_OPCODES` environment variable is set to `True` (available only for Cython) to ease the debugging of such cases in the future.

(cherry picked from commit 77399d3b7b2b9bc6aac1b85d59ae305500cb6ecb)

GitOrigin-RevId: 105bf9d3d2cc51a940b03b1cb11c07e97074048b
2019-12-19 14:08:32 +00:00
Ilya.Kazakevich
70f83ef44c Test broken because of PY-39656
GitOrigin-RevId: 0ebc631dd4748a7583c9653db2dc77b2cb419d6c
2019-12-18 20:02:55 +00:00
Ilya.Kazakevich
3348ea74ef Flaky test goes to staging
GitOrigin-RevId: 47045f1686bcde1fd8d32c5e212704b0c18791f0
2019-12-18 18:12:51 +00:00
Semyon Proshev
161a28d32a Infer correct type for docstrings (PY-35885)
GitOrigin-RevId: 2994a2e312611b038c72ec18abb2cd96880213e9
2019-12-17 14:06:19 +00:00
Ilya.Kazakevich
d2cd69fc9e Fix test (call dispose() in finally)
GitOrigin-RevId: c0c8ce3f691fc09d728a347e2e364f14375422cf
2019-12-12 17:04:48 +00:00
Semyon Proshev
646f31a657 Don't highlight one element tuple in return (PY-34262)
GitOrigin-RevId: e1befffd14958e606f3f327848e5fee79dc68c03
2019-12-12 14:38:32 +00:00
Ilya.Kazakevich
47fa6b7c4f Register module type in tests.
Some configuration producers fail if module type is unknown

GitOrigin-RevId: 58b0342873c5e5d4b653a1c6a8955386c3fc4a44
2019-12-12 00:32:07 +00:00
Ilya.Kazakevich
c4b849d3d0 Flaky tests moved to staging
GitOrigin-RevId: deb2db2fc65b23aa0a97adcb8488d39937a916b0
2019-12-11 14:40:19 +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
dc2faf114c Don't raise a missing type hints warning on function that has type hinted overloads (PY-39556)
GitOrigin-RevId: 15f29db84e0687c9573619a380eafab0b68f9072
2019-12-11 13:12:09 +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
Alexey Kudravtsev
9f8c04d183 remove spam from test console
GitOrigin-RevId: a2d55be12c4d15840a501232a58d891483c60499
2019-12-11 10:02:43 +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
Elizaveta Shashkova
132863ee8f PY-38763 Add instructions for Windows
GitOrigin-RevId: 826776981b503101a52f6a942b36c8f14e7d7a13
2019-12-09 16:09:07 +00:00
Stanislav Utikeev
d0407342dd [analysisTool] use CamelHumpMatcher in common tests and analysis tool
GitOrigin-RevId: cf10758e9862b521051c60bc331cd83cbb62b802
2019-12-06 15:10:09 +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
Vladimir Krivosheev
8254a47327 use run all approach to dispose app and detect memory leaks in tests
GitOrigin-RevId: b95c4d54ab32fb1577729c3894e118ac38901334
2019-12-05 12:38:14 +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
Ilya.Kazakevich
f6348985e0 Resolve context should not support implicits by default.
Implicits are slow.
* defaultContext() now doesn't have em
* implicits are enabled explicitly (no wordplay here!) for certain user-initiated actions and findReferenceAt
* Latter is for navigating to methods/attributes of unknown types

GitOrigin-RevId: 62df6707507584576ea4c193ccf6e7f0c128c5be
2019-12-03 17:11:06 +00:00
Stanislav Utikeev
1d9a4e5d49 More thorough root system in analysis tool VFS
GitOrigin-RevId: 3f76429e69268d40d23c08dfd88dc2593a37efdf
2019-12-03 15:11:09 +00:00
Stanislav Utikeev
64a66563fb Consistent naming for common Python tests and fixtures: (Python|Py)(Common|Platform?|Psi)(.+)
GitOrigin-RevId: 648dc76cfd3edc5567f46eceaeaaa9afa5433331
2019-12-03 15:11:09 +00:00
Stanislav Utikeev
593ea26bb1 Move Python completion test to common Python tests
GitOrigin-RevId: 120f8943fbd93a55d6e2e2d9d9e5e3b36c8c0a4f
2019-12-03 15:11:09 +00:00
Stanislav Utikeev
9846716abb Move parsing tests to according package
GitOrigin-RevId: 36342ae76f07ee46ccb2c0e84344849daff54c4c
2019-12-03 15:11:09 +00:00
Stanislav Utikeev
e871a56af0 Refactor Python tests
- move PyResolveTest to common tests
- support common test fixture for both platform and analysis tool

GitOrigin-RevId: dafe7a942b1c9d4d927dc5e2f412a0941e0b0dd1
2019-12-03 15:11:09 +00:00
Stanislav Utikeev
34eac85dbc Add PythonMockSdk to testSrc
GitOrigin-RevId: 8bf760966f982438084cd82b2f2c1ddd2c82ff93
2019-12-03 15:11:09 +00:00
Stanislav Utikeev
060c951aca Add PythonTestUtil to testSrc
GitOrigin-RevId: 7420cc79811e10812bdd6a828de4e050c2b7b430
2019-12-03 15:11:09 +00:00
Dmitry Trofimov
7ec5c11c93 Don't depend on testFramework and make python-openapi not depend on lang
GitOrigin-RevId: c34a51bb984110d087fdddeff41c304f362ba4fe
2019-12-03 15:11:09 +00:00