Commit Graph
4610 Commits
Author SHA1 Message Date
Semyon Proshev 4250af811d Add an option to ignore unused variables starting with '_' (PY-27435) 2018-04-13 19:23:01 +03:00
Semyon Proshev 36fb23d4ab Update PyTypeProvider.getReferenceType to return Ref (PY-28052) 2018-04-11 23:47:44 +03:00
Anton Bragin 4aeb385d94 PY-25263 Attribute initialization via property set implemented 2018-04-11 11:13:42 +03:00
Anton Bragin d2061e69f7 PY-28341 Already used entries don't removed from completion list
Entries that were used in code remain in the completion list.
Return type of PyQualifiedReference updated to reflect the fact that it
returns PyTargetExpression's only.
2018-04-10 14:16:53 +03:00
Semyon Proshev 7ed220d61d Special case completion for __prepare__ (PY-28154)
Apply inspection settings and decorate with `@classmethod`
2018-04-09 17:54:45 +03:00
Semyon Proshev a6c795551c Don't collect imported with as elements as named elements (PY-21837)
Because such elements are not presented in stub.
2018-04-09 17:51:35 +03:00
Semyon Proshev 6e0ad4e0c8 Don't suggest print function if Py2 file does not contain corresponding import from future (PY-28103) 2018-04-09 17:49:55 +03:00
Semyon Proshev 45317ba634 Check if import source is located in the same package or above (PY-26139) 2018-04-09 17:48:57 +03:00
Semyon Proshev 9bdf80e66e Don't apply substitution from ancestor if class defines its own type variable (PY-27783) 2018-04-09 17:48:57 +03:00
Semyon Proshev 91af98d772 Look for unbound class level variable on file level, not in parent scope (PY-19890) 2018-04-09 17:48:56 +03:00
Elizaveta Shashkova e523947ed7 Tests: fix flaky console and suppress IronPython test 2018-04-09 17:36:09 +03:00
Andrey Vlasovskikh 4f5eefdea2 PY-29338 Revert "PY-28629: Fix resolving skeletons for implicit relative imports"
This reverts commit be8aaaaf53.
2018-04-06 22:09:14 +03:00
Ilya.Kazakevich 1bd950ed71 PY-29371: Sync with teamcity(#176): purge tests on "scenario" call
When some scenarios are skipped due to tags, behave reports their steps but never reports "match" for them.

So, on next "match" stale (ignored actually) step is left on stack and used instead of real one
2018-04-05 19:51:48 +03:00
Anton Bragin ca5a65abc1 PY-28313 Highlighting updated to treat *args/**kwargs as a single item 2018-04-05 14:37:50 +03:00
Ilya.Kazakevich 140caeb985 PY-28075: twisted trial, as unittest, can't run on plain functions 2018-04-05 02:01:59 +03:00
Ilya.Kazakevich 9a82e20592 PY-27636: Add cwd to pythonpath's head instead of tail
current workdir must be inserted at position 0, not at
the last position because local files (like "test.py") must have priority over site-lib
2018-04-04 23:57:06 +03:00
Mikhail Golubev dbf49edb14 PY-10972 Recursively detect the alignment owner for the new block on enter
by properly implementing Block.isIncomplete() for collection literals,
comprehensions and parenthesized expressions instead of hand-written
search for the preceding expression lacking the closing bracket.
2018-04-04 19:29:49 +03:00
Anton Bragin 7da7b7ac36 PY-28321 Revert source root order for imports
The commit reverts source root order respect for import statements thus
reopening PY-28321. The reason is that until pkg_resources and pkgutil
namespace packages are not implemented (see PY-16688, PY-23087) the
original fix leads to false positives in projects relying on this
functionality.

As soon as namespace packages support via pkg_resources and pkgutil will
 be implemented the change should be reverted back to close PY-28321.
2018-04-03 19:00:01 +03:00
Mikhail Golubev 0e9810168a PY-10972 Properly align elements of expressions without closing bracket on enter
instead of using artificially built indentation. It also covers all
collection literals, comprehensions and glued string literals in
parentheses most of which were overlooked in the previous implementation.
2018-04-03 18:45:43 +03:00
Elizaveta Shashkova 417acc3842 Fix focus requesting when starting Python Console and debug (PY-26156) 2018-04-03 12:27:25 +03:00
Anton Bragin 9b5a4eb70d PY-3674 Completion items starting with underscore moved down
When sorted by the relevance internal items (the one starting with
underscore) now weighted down to appear at the end of completion list.
2018-04-03 10:58:31 +03:00
Ilya.Kazakevich 519cd800c8 PY-28893: Sync with teamcity-messages
+test added

Convert objects and message in diff to string
2018-04-03 02:27:23 +03:00
Semyon Proshev a98aa9ed91 Don't warn about conflict between class var and slot if var has not assigned value (PY-29234) 2018-04-02 20:06:53 +03:00
Semyon Proshev dc4b93db04 Don't raise none assignment warning when return type is not None (PY-28729) 2018-04-02 20:06:28 +03:00
Semyon Proshev 87cfacbb3f Don't collect names in parameter default and annotation for visited function (PY-19599)
Because they are collected in the outer scope and outer scope is considered as their owner in ScopeUtil.getScopeOwner.
2018-04-02 19:01:29 +03:00
Semyon Proshev c80c39e29e Update PyClass so local slot overrides inherited property (PY-28206) 2018-04-02 18:50:24 +03:00
Semyon Proshev a6c3621086 Reduce code duplication in determining if default argument value is mutable (PY-27517) 2018-04-02 18:48:25 +03:00
Liana.Bakradze 447c7da9a5 move flaky test to staging 2018-04-02 16:06:29 +03:00
Elizaveta Shashkova 86bd00fe56 Get rid of context manager, because it doesn't work fine with IronPython (PY-20959)
Also suspend some tests
2018-04-02 13:56:49 +03:00
Semyon Proshev 9c27646752 Don't ignore files and resolve modules in them (PY-28764) 2018-03-30 15:09:00 +03:00
Ilya.Kazakevich ca744da635 PY-29243: Remove first item from sys.argv for tox
first item is _jb_runner name which is not how tox does.
It breaks {posargs}
2018-03-30 00:41:18 +03:00
Ilya.Kazakevich b6940f6975 PY-29163: Create different config. if different files are used.
Assume you have two elements with same name but in different folders.
Targets are same but resolved to different elements because of
different working directories.

We now check if configuration's target resolved to same file
before reusing it.
2018-03-29 22:04:39 +03:00
Semyon Proshev 0fd58c6b70 Fix test after syncing with typeshed 2018-03-28 19:16:01 +03:00
Anton Bragin a2f194d858 PY-17810 PY-28989 Namespace package modules added to autocompletion
Packages are added to completion results. Common functionality extracted to PyExtendedCompletionContributor.
2018-03-28 13:01:13 +03:00
Anton Bragin a69da3b135 PY-17810 PY-21441 Illegal autocomplete entries removed
Illegal autocomplete entries removed for classes/functions and packages.

* Local and nested classes removed
* Entries without importable path removed
* Similar entries from different source roots deduplicated
* Packages narrowed to the ones that can be resolved

Module completion delegated to the separate
CompletionContributor and switched to use PyModuleNameIndex.
2018-03-28 13:01:12 +03:00
Ilya.Kazakevich 00d01b6ab8 test fix: skip test on IronPython because of IronPython bug (Stackoverflow) 2018-03-28 01:32:26 +03:00
Ilya.Kazakevich 3d5d10bb99 test fix: skip ascii test on IronPython 2018-03-27 22:35:45 +03:00
Semyon Proshev 68b17b57c0 Make return type weak for functions decorated with unknown decorator (PY-28626)
Or decorator that could change return type.
2018-03-27 21:33:54 +03:00
Ilya.Kazakevich 30adb975c9 test fix: remove comments that depend on .net version 2018-03-27 18:08:00 +03:00
Ilya.Kazakevich 8f854e5917 test refactored 2018-03-27 16:25:16 +03:00
Ilya.Kazakevich 7010bb3468 test fix: remove comments from ironpython skeletons 2018-03-27 04:19:14 +03:00
Ilya.Kazakevich 83e8ce4086 test fix: skip iron on *nix 2018-03-27 03:37:39 +03:00
Ilya.Kazakevich f54bb4fe35 test fix: NPE 2018-03-27 01:49:33 +03:00
Ilya.Kazakevich f711edc17b test fix: use correct modality state 2018-03-27 01:02:52 +03:00
Ilya.Kazakevich e8d12bf09a tests must be skipped on certain OSes 2018-03-27 00:59:41 +03:00
Semyon Proshev 42e4964191 Visit else in while in any case even if condition is True (PY-28972)
But when condition is `True`, edge to `else` is not created.
2018-03-26 19:36:15 +03:00
Mikhail Golubev ee16086211 PY-29121 Handle a missing case of the common name placement in Simplify chained comparison
When it's on the right of a leftmost comparison and there's an
additional AND term between the two comparisons to be chained.
2018-03-23 17:43:41 +03:00
Mikhail Golubev 36df2222b6 PY-24942 Don't chain AND expressions in Simplify chained comparison
When the leftmost binary relationship expression of the two being
transformed belongs itself to the left operand of a nested logical AND.
Previously, we mistakenly tried to insert the containing logical AND
expression into the generated chained comparison when useRightChildOfLeft
parameter of the quickfix was false.
2018-03-23 17:43:41 +03:00
Semyon Proshev e2f1a8f960 Improve support for numbers as keys for dicts (PY-27375) 2018-03-22 21:48:59 +03:00
Mikhail Golubev 39358aeb12 PY-20324 Don't report parentheses around returned tuples with unpacking 2018-03-21 17:28:35 +03:00