Commit Graph
20363 Commits
Author SHA1 Message Date
Ilya.Kazakevich e401531a4a PY-2821: Support "reverse" and Co reference injection
* Drop Django 1.5 style {% url %} tag support
* Provide view name references for reverse etc
* Improve  DjangoFQNamesProvider API to support "package/name only" check
2017-12-18 23:15:26 +03:00
Mikhail Golubev 8346c97d60 PY-27266 Don't use ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION in Python formatter
It is not actually exposed anywhere in Python code style settings and
defaults to false thus affecting parenthesized multiline (chained)
qualified references and calls. Previously, oddly enough, this
behavior was controlled by ALIGN_COLLECTIONS_AND_COMPREHENSIONS flag.
2017-12-18 19:59:51 +03:00
Semyon Proshev fc7cef68eb Sync with typeshed @ 64ca731d0bb10114d75bd620c0af28c0104de0ec 2017-12-18 19:34:07 +03:00
Semyon Proshev 84e8559292 Enable signal stubs (PY-21437) 2017-12-18 19:34:07 +03:00
Semyon Proshev 3c18871774 Enable threading stubs (PY-22765) 2017-12-18 19:34:06 +03:00
Semyon Proshev 5a2e9d33d0 Enable uuid stubs (PY-23287) 2017-12-18 19:34:06 +03:00
Semyon Proshev 422286c7e6 Enable argparse stubs (PY-26190, PY-24621) 2017-12-18 19:34:05 +03:00
Semyon Proshev 04054911a9 Enable time stubs (PY-22192) 2017-12-18 19:34:05 +03:00
Semyon Proshev 32d1620185 Enable re stubs (PY-24440, PY-22308)
The most important part of this commit is that local module has more priority against typeshed one.
2017-12-18 19:34:05 +03:00
Semyon Proshev e207dcd063 Enable shutil stubs (PY-23887, PY-22759, PY-21827) 2017-12-18 19:34:04 +03:00
Semyon Proshev 18f29e0174 Enable functools stubs (PY-26167) 2017-12-18 19:34:04 +03:00
Elizaveta Shashkova e5b6c6cc09 Highlight built-in decorators with decorators colors, not not built-in colors (PY-25381) 2017-12-18 18:49:12 +03:00
Elizaveta Shashkova 4f82c0e6c7 Debugger fails to load Variables with detached Variables pane (PY-27354)
Revert changes made by PY-26289, because they break some use cases. Proper fix requires changes in platform UI.
2017-12-18 17:51:50 +03:00
Elizaveta Shashkova f61aff69fb "Show command line ..." breaks Coverage, Profiler and Concurrency Diagram (PY-27431)
It looks like this option is useless for these actions. It isn't available for Test run configurations - the most frequent use case for coverage. An output console isn't available for Concurrency Diagram, so users can't type any commands there. It doesn't work correctly with profiler's wrapping.
2017-12-18 17:39:24 +03:00
Elizaveta Shashkova f77e98980f Tests: move VariablesView test to staging 2017-12-18 17:33:53 +03:00
Elizaveta Shashkova d47abb1b55 Tests: remove check for async values since we start loading async values for all variables in the current frame by default 2017-12-18 17:27:34 +03:00
Ekaterina Tuzova 88671a96cf PY-27121 Scientific View: Plot is not displayed properly 2017-12-18 16:18:25 +03:00
Ekaterina Tuzova 49ca7afd59 NPE: PyFrameAccessor.evaluate(expression) 2017-12-18 16:18:24 +03:00
Alexey Kudravtsev 84f7df6f22 cleanup 2017-12-18 14:52:34 +03:00
Alexey Kudravtsev b2a8cb5f48 assert that rangeInElement is inside the descriptor range to avoid surprising "index out of range" exceptions 2017-12-18 14:52:34 +03:00
Mikhail Golubev 46ca96b7cb PY-24990 Add extra tests on more elaborate cases of annotations for cls/self
First, on matching type var with a union receiver type.

Though we're not able to match types like "Union[Type[A], Type[B]]" with
parametrized "Type[T]" to infer that T is Union[A, B] yet (should we?).

Second, on calling an annotated instance method on a class object
(when an argument for "self" is provided explicitly).
2017-12-15 15:14:12 +03:00
Mikhail Golubev 163846c5d8 PY-24990 Match cls type with the receiver when class method is called on instance 2017-12-15 15:14:12 +03:00
Mikhail Golubev d6fa1ba18c PY-24990 Duplicate respective tests for function type comments 2017-12-15 15:14:12 +03:00
Mikhail Golubev f44abaa895 PY-24990 Use the mapping of cls/self to receiver only to infer the call type
It doesn't affect the rest of the code insight that drastically.
2017-12-15 15:14:12 +03:00
Mikhail Golubev b25fc9d6c9 PY-24990 Initial attempt to support generic types for self and cls
by including the mapping for these special parameters in PyArgumentsMapping
2017-12-15 15:14:12 +03:00
Aleksey Rostovskiy 7bc4243e55 fix problem with existing links in EnvTests 2017-12-15 12:41:41 +03:00
Ilya.Kazakevich f03ce9818b Fix tests: move "testCantRerun" to UT only
Its hard to check it with trial because for trial we use tempdir in tests and it fools rerun action to think testspect is set.
Changing this may be hard, it does not make any sense nor does
it affect production code. Leave it alone
2017-12-15 03:52:36 +03:00
Ilya.Kazakevich 371f619592 PY-27170: isFolder || file.name.endsWith(".py") filter for tests 2017-12-15 02:11:22 +03:00
Ilya.Kazakevich 0cdf30698b Fix tests: clean up environments 2017-12-15 01:52:26 +03:00
Ilya.Kazakevich e21064320e Fix tests: trial needs separate test folder 2017-12-14 22:48:09 +03:00
Mikhail Golubev a8ee32f847 PY-27360 Use multimap to initialize Conda package cache
Also use TreeSet as the container for values to sort versions in
descending order and keep them unique at the same time.
2017-12-14 21:29:12 +03:00
Mikhail Golubev dba31cf0d8 PY-27360 Unify implementations of PyPI and Conda package caches 2017-12-14 21:29:12 +03:00
Mikhail Golubev e93970a179 PY-27360 Initial implementation of a package cache for Conda 2017-12-14 21:29:12 +03:00
Mikhail Golubev 2180af9210 PY-24412 Keep information about packages in individual objects in the cache
This way we may easily add extra fields in the cache in case we need
them in future.
2017-12-14 21:29:12 +03:00
Mikhail Golubev cb67c6ba85 PY-27028 Fix several issues with PyPI package cache when PyPI is disabled
- Don't clear the cache of packages regardless of whether
"pypi.python.org" is enabled or not (achieved along with fixes for
PY-24412)
- Properly hide PyPI packages in "Available Packages" if PyPI is
disabled
- Don't update PyPI cache on startup if it's disabled and don't
touch the respective timestamp
2017-12-14 21:29:12 +03:00
Mikhail Golubev 777b7dde20 PY-24412 Keep names of PyPI packages separately from the packaging settings
So as not to load the whole cache of available packages on EDT just
to get a timestamp for its invalidation in PyPackagesUpdater.

One simplification I made is that we no longer store the latest versions
of these packages in persisted settings. It would to much of a hassle
to keep it in sync then, and overall it's not that beneficial since
we're not able to get both package names and their versions in one
request due to the latest changes in PyPI API.
2017-12-14 21:29:12 +03:00
Mikhail Golubev adb7ef06c4 PY-21864 Avoid unstubbing while accessing ahead of time annotations
Namely, don't use Scope to find an annotation if AST access is not
allowed.

Added tests on handling of top-level variable annotations and class
attributes annotations in other files. Supposedly, we don't resolve
to unqualified target expressions in other scopes when unstubbing is
forbidden (ordinary local variables are not preserved in PSI stubs).
2017-12-14 19:00:46 +03:00
Mikhail Golubev d2eb0c6fde PY-21864 Support of ahead of time variable annotations
We search for them only in the same scope where the corresponding target
expression (of for loop, with statement or LHS of assignment with tuple
unpacking) is defined itself.

Another limitation is that this lookup is performed without proper
caching of this information on an affected target yet.
2017-12-14 19:00:46 +03:00
Mikhail Golubev 1857a07baa PY-24729 Alternative way to discover assignment to an instance attribute 2017-12-14 19:00:46 +03:00
Mikhail Golubev ae58f4e52a PY-24729 Initial support of instance attributes annotated on class level 2017-12-14 19:00:46 +03:00
Alexey Kudravtsev e6423cd6fd cleanup 2017-12-14 14:24:04 +03:00
Alexey Kudravtsev 55c60b7d62 notnull 2017-12-14 14:24:03 +03:00
Alexey Kudravtsev 08c15d5a85 notnull 2017-12-14 14:24:02 +03:00
Alexey Kudravtsev 02a852d1ba cleanup 2017-12-14 14:24:02 +03:00
Elizaveta Shashkova a7f52f3d32 Fix NPE introduced by PY-27227 (EA-113959) 2017-12-14 14:07:21 +03:00
Aleksey Rostovskiy 003763b55f update build scripts for env tests with new version of gradle-env-plugin 2017-12-14 13:39:37 +03:00
Ilya.Kazakevich a466580fab PY-27395: Support 2.6 (according to IDEA-CR-27815) 2017-12-14 01:45:24 +03:00
Semyon Proshev 21e4de949c Add Python 3.7 language level
Additionally, I did the following:

* re-generated lists of supported/unsupported interpreter modules
* updated test data wherever Python versions appear in warnings

Still need to figure out, though, why _bz2/bz2 modules were not found
for some old versions of Python, hence information about their presense
should be updated by hand in versions.xml.
2017-12-13 19:44:29 +03:00
Semyon Proshev 96e41895d3 Deprecate Python 2.5 language level. Remove its usages. 2017-12-13 19:44:28 +03:00
Semyon Proshev 556cb4fd3d Deprecate Python 2.4 language level. Remove its usages. 2017-12-13 19:44:28 +03:00