Commit Graph
3657 Commits
Author SHA1 Message Date
Mikhail Golubev 483439720c PY-21645 Disable some inspections in function type comments 2016-12-02 17:26:11 +03:00
Semyon Proshev 2174c9b258 PY-20682 Fixed: await something() as function argument is not recognized by syntax analyzer
Copy `async` flag in ParsingScope.withSuite
2016-12-02 13:54:24 +03:00
Roman Shevchenko ee16f3ffee Cleanup (dead code) 2016-12-01 17:45:38 +01:00
Semyon Proshev 42c6c1be3e NumpyResolveRater will not change member rate if NDARRAY type is not found 2016-12-01 15:19:00 +03:00
Valentina Kiryushkina 32caddb853 PY-21707 Invalid "Unresolved reference" in multiline format strings
It's a regression introduced by fix of  PY-19842
2016-11-30 19:22:14 +03:00
Semyon Proshev e3f371128b PY-21692 Fixed: Return type of sum(List[Decimal]) is 'Any' (should be 'Decimal')
Add skeletons for builtin sum function
2016-11-29 20:32:25 +03:00
Semyon Proshev 60edb30580 Update skeletons for max function 2016-11-29 20:32:25 +03:00
Semyon Proshev c60419eb7e Update skeletons for min function to fit updated type processing of positional and keyword arguments 2016-11-29 20:32:25 +03:00
peter c36a7264ac clear read-only status outside write action in Surround With 2016-11-28 21:57:51 +01:00
Semyon Proshev cb65a7a44b Forget to filter metaclass attributes by name while resolving class type member. This bug was introduced in PY-19702-related changes. 2016-11-28 16:14:40 +03:00
Ilya.Kazakevich 2f13c16353 PY-20307: Arguments not passed to tox runner 2016-11-26 01:49:05 +03:00
Semyon Proshev a9ecefe927 PY-21474 Fixed: Type checking confused by None default argument
PyTypeAssertionEvaluator: Mark reference which is used as condition in PyConditionalExpression as non-None
2016-11-25 19:10:02 +03:00
Semyon Proshev 54a5e386f4 PY-21458 Fixed: Live template hangs PyCharm in some case
Don't analyze implicit imports while searching iterable variable for live template
2016-11-25 19:06:51 +03:00
Semyon Proshev b7fa4c5269 Simplify PyLiveTemplatesContextTest 2016-11-25 19:06:50 +03:00
Semyon Proshev ac662e927d Rename PyLiveTemplatesTest to PyLiveTemplatesContextTest 2016-11-25 19:06:50 +03:00
Semyon Proshev 45ec95d939 PY-19723 Fixed: Type hinting of arbitrary argument lists and default argument values
Update PyTypeChecker to substitute type vars with types of positional and keyword args (incl. heterogeneous ones)
2016-11-25 19:02:43 +03:00
Semyon Proshev 421655e180 PY-19723 Fixed: Type hinting of arbitrary argument lists and default argument values
Update PyTypeCheckerInspection to handle keyword arguments
2016-11-25 19:02:43 +03:00
Semyon Proshev f8b0121a48 PY-19723 Fixed: Type hinting of arbitrary argument lists and default argument values
Update PyNamedParameterImpl to return collection types with unknown elements instead of tuple and dict.
2016-11-25 19:02:42 +03:00
Semyon Proshev 45e473cac8 PY-19723 Fixed: Type hinting of arbitrary argument lists and default argument values
Update PyDocStringTypeProvider to correctly handle `:type args: T1` and `:type kwargs: T2`, and wrap their types to `Tuple[T1, ...]` and `Dict[str, T2]`.
2016-11-25 19:02:42 +03:00
Semyon Proshev 5e214c4b4a PY-19723 Fixed: Type hinting of arbitrary argument lists and default argument values
Update PyTypingTypeProvider to correctly handle `args: T1` and `kwargs: T2`, and wrap their types to `Tuple[T1, ...]` and `Dict[str, T2]`.
2016-11-25 19:02:41 +03:00
Mikhail Golubev 7f96674bb3 PY-21204 Quickfix "Create function" properly handles injected fragments
by inserting a new function in the containing host file, not inside the
fragment itself.

Also I fixed issues with keeping hard references to PSI elements and
usage of deprecated TemplateBuilder's API.
2016-11-25 17:45:24 +03:00
Mikhail Golubev b09b8a30fd PY-21644 Proper family names for "Install and import package" and "Create function" quickfixes 2016-11-25 17:45:24 +03:00
Mikhail Golubev 8c0fe707e5 PY-21204 Create a new class in host file instead of injected fragment
Additionally, I removed usages of deprecated API in CreateClassQuickFix
and utilize SmartPointer to hold the reference to PSI element.
2016-11-25 17:45:24 +03:00
Mikhail Golubev 190fe91332 PY-21563 Join "from" imports with the same origin if "Import ..." quickfix is run from type comment 2016-11-25 17:45:24 +03:00
Mikhail Golubev b01adf74ab PY-18688 Use host file when adding imports on smart completion in type comments 2016-11-25 17:45:24 +03:00
Semyon Proshev 919ba06dd7 Support six.add_metaclass decorator 2016-11-23 14:37:35 +03:00
Semyon Proshev a0d7707e84 PY-21224 Fixed: False positive unresolved base method when using six.with_metaclass() and multiple inheritance
Support metaclass and several base classes in six.with_metaclass
2016-11-23 14:37:35 +03:00
Mikhail Golubev c38d178be5 PY-21220 Handle moved classes that contain both __init__ and __new__
I changed behavior of PyClassImpl#NameFinder processor, so that it
always tries to find an element with the first of the names passed to
its constructor. In particular, #findInitOrNew() returns __init__
unless there was only __new__ defined in the class. Otherwise its
behavior contradicts with the method's javadoc.
2016-11-22 17:50:21 +03:00
Mikhail Golubev 5fa7c78ebe PY-20427 Handle qualified references in the module where symbol is moved to 2016-11-22 17:50:21 +03:00
Mikhail Golubev 5c3b5e06fa PY-21292 Properly delete obsolete imports of moved symbols
Some of them might have been left if the corresponding symbols were used
and imported via "from" imports in the same module or new imports of them
were combined with some exiting "from" imports in a dependent module.
2016-11-22 17:50:21 +03:00
Mikhail Golubev d51fa3ee60 PY-21366 Consider import aliases when restoring imports for moved element 2016-11-22 17:50:21 +03:00
Elizaveta Shashkova 1338cf3f09 Tests: fix PyDynamicTypesTest
The Python side of debugger doesn't handle filename correctly when working with temp dir
2016-11-22 17:03:51 +03:00
Liana.Bakradze 70776a2225 move good env tests from staging 2016-11-21 14:19:23 +03:00
Ilya.Kazakevich 5f02121329 Fixing tests:
* Latest versions of tox reports error if no command specified
2016-11-17 23:17:12 +03:00
Semyon Proshev e87b053584 PY-21350 Fixed: Wrong return type for input() in Python 3
Add skeletons for raw_input() in Python 2 and input() for both Pythons.
Update PyUserSkeletonsTypeProvider to wrap callable's return type even if it's null.
2016-11-17 20:09:32 +03:00
Semyon Proshev c3b92c6c88 PY-20409 Fixed: dict.get(..., None) is assumed to return None
PyTypeChecker: if expected type is UnionType, try to match actual type with its non-generic members and then with generic ones
2016-11-17 19:17:12 +03:00
Mikhail Golubev c38ed868d0 EA-83566 PyStructureViewElement considers that underlying PSI element can be invalid 2016-11-16 15:39:57 +03:00
Ilya.Kazakevich 5b5023467b Doc added for PyEnvTestCase 2016-11-16 00:35:32 +03:00
Semyon Proshev 146abbc28c Decrease number of warnings in PyReferenceImpl, PythonCompletionTest and Py3CompletionTest 2016-11-15 16:05:09 +03:00
Semyon Proshev 3b5e051bfe PY-20279 Fixed: Suggest implicit __class__ inside methods
In PyReferenceImpl add implicit __class__ to lookup variants
2016-11-15 16:05:09 +03:00
Semyon Proshev 9bab826071 PY-21040 Fixed: False positive: os.popen(...).close() doesn't return anything
Update os.popen skeleton to return class which has return value in close()
2016-11-15 15:54:43 +03:00
Semyon Proshev c58302f45c PY-20757 Fixed: Incorrect warning about expected attribute
Make min skeletons generic.
2016-11-15 15:40:10 +03:00
Semyon Proshev 309dd061f0 Support type checking for positional arguments 2016-11-15 15:39:05 +03:00
Semyon Proshev f1a0dc0ab6 PY-20769 Fixed: Support PEP 519: File system path protocol
Update skeletons to accept PathLike objects in open and os.path functions
2016-11-15 15:39:05 +03:00
Semyon Proshev e67d313bf1 PY-20769 Fixed: Support PEP 519: File system path protocol
Add __fspath__ to PY36_BUILTIN_METHODS
2016-11-15 15:39:04 +03:00
Semyon Proshev 15e5d938d5 PY-21083 Fixed: Inspection of float.fromhex expecting incorrect arguments
Fix skeleton for float.fromhex
2016-11-15 15:37:19 +03:00
Elizaveta Shashkova 7a1ee38531 Run PyQt tests with the latest version of envs plugin 2016-11-15 15:35:30 +03:00
Semyon Proshev 5c920951f0 PY-19702 Fixed: Unresolved metaclass attributes in children
In case of definition resolve attribute in metaclass definition and instance.
In case of instance check if metaclass is PyClass and look for attribute in instance attributes.
Same with completion.
2016-11-15 15:33:07 +03:00
Ilya.Kazakevich fc5589b1f5 PY-18473: Find Python using win registry and pep-514
* Using DI to remove WinPythonSdkFlavor dependency on registry tools and make it testable
* Check all registry branches according to pep514
2016-11-14 22:58:36 +03:00
Mikhail Golubev 6bcf1ea623 PY-21399 Backslash in the middle of an escape sequence ends it in PyStringLiteralLexer
Otherwise it might miss the following escaped quote and stop scanning
a string literal earlier than the actual Python lexer.
2016-11-11 17:43:25 +03:00