Mikhail Golubev
8d8c3fb930
PY-20864 Python control flow builder considers variable annotations
2016-09-26 09:09:23 +03:00
Mikhail Golubev
ccbe06603c
PY-20026 Add test for the scenario provided by the user
...
The problem itself has been already remedied by the previous fix,
nonetheless, the example given by the user provides an interesting
case where we can encounter duplicate base classes in practice,
since we are not able to find out result of type(SomeClass) expression
yet.
2016-08-19 16:52:42 +03:00
Mikhail Golubev
28bb6dee75
PY-20026 PyClassImpl#mroLinearize() properly handles duplicate base classes
...
The exception could happen in this case because we used the same cached
result of MRO linearization twice without defencive copying. Then later,
as a side effect of that, in mroMerge() we deleted one "head" from
several sequences simultaneously, hence the IndexOutOfBoundsException.
2016-07-15 18:39:11 +03:00
Mikhail Golubev
9b49498808
PY-19279 Smart enter on function inserts colon after return type annotation
2016-04-28 14:28:28 +03:00
Semyon Proshev
58a92fde16
PY-12396 Fixed: Property getter live template is useful only inside python class
...
Separate Python liveTemplatesContext into two parts: General and Class
2016-02-15 14:19:19 +03:00
Mikhail Golubev
a955f6c927
PY-16765 For sections inside Google code style docstring use indentation configured for Python
...
PyFunctionBuilder and PyDocstringGenerator require a PSI element to
use proper formatting and style for generated docstring.
2015-09-23 18:42:17 +03:00
Mikhail Golubev
3826afdf6c
PY-16765 In Google docstrings smart enter adds colon and indentation after section header
2015-09-07 22:01:24 +03:00
Mikhail Golubev
fbbf4dcade
PY-15656 Insert closing parenthesis of parameter list right after opening one if there are no parameters
2015-04-21 15:14:26 +03:00
Mikhail Golubev
246fcae221
PY-15653 Better handling of class definitions with the list of base classes but no name node
2015-04-21 15:14:26 +03:00
Mikhail Golubev
3f519db066
PY-15653 Smart enter works better in case of function and class definitions without name element
2015-04-21 15:14:25 +03:00
Mikhail Golubev
d740159214
Merge remote-tracking branch 'origin/master' into mikhail.golubev/py-attribute-inference
...
Conflicts:
python/src/com/jetbrains/python/psi/impl/PyClassImpl.java
python/src/com/jetbrains/python/psi/impl/PyNamedParameterImpl.java
python/src/com/jetbrains/python/psi/impl/PyReferenceExpressionImpl.java
python/src/com/jetbrains/python/psi/impl/references/PyQualifiedReference.java
python/testSrc/com/jetbrains/python/PythonCompletionTest.java
python/testSrc/com/jetbrains/python/codeInsight/PyClassMROTest.java
2014-12-25 15:32:43 +03:00
Andrey Vlasovskikh
b37b0440d0
PY-11932 Put nulls for unresolved class types in MRO
...
Some of the ancestor class-like types may be unresolved. The best we
can do is to put nulls for all the unresolved classes to appropriate
places inside the MRO chain. What we used to do in this case it return
the empty sequence of the ancestors.
2014-12-22 14:05:31 +03:00
Mikhail Golubev
99f4933e70
PY-9209 Insert a space after '#' sign when using smart enter in comment
2014-11-18 01:28:45 +03:00
Mikhail Golubev
af29e9ba36
Prevent recomputation of superclasses during first call to isNewStyleClass
2014-10-17 18:12:01 +04:00
Mikhail Golubev
3c7e51dcd7
Memoize result of MRO resolution
2014-10-16 21:47:51 +04:00
Mikhail Golubev
5de0b14903
PY-12877 Fix complains found during review (IDEA-CR-397)
2014-09-08 12:47:15 +04:00
Mikhail Golubev
2851b82675
PY-12877 Add test for the case when no expression given in 'with' header
2014-08-05 13:03:29 +04:00
Mikhail Golubev
3089c9cb09
PY-12877 Complete statement doesn't insert colon for 'with' statement
2014-07-22 16:30:53 +04:00
Andrey Vlasovskikh
58f85ba28d
Fixed 'isinstance' analysis for expressions that are resolved to tuples (PY-7573)
2013-09-18 19:53:04 +04:00
Andrey Vlasovskikh
196b3ce9b2
Fixed getting superclass from 'six.with_metaclass()' call
2013-09-16 21:32:48 +04:00
Ekaterina Tuzova
c022f2520f
added failing test for with_metaclass
2013-09-16 16:01:27 +04:00
Andrey Vlasovskikh
83a912ad84
Added negative type assertions for 'else' and continue after 'if' then exit (PY-5084, PY-7694, PY-9118)
2013-04-22 17:56:52 +04:00
Andrey Vlasovskikh
2eab025659
Added test for MRO in complicated diamond hierarchy (PY-4183)
2013-04-18 21:29:49 +04:00
Andrey Vlasovskikh
d6972abf2a
Fixed several bugs in new-style MRO algorithm
2013-04-18 21:03:50 +04:00
Andrey Vlasovskikh
451e92581d
Fixed false positive in unbound vars inspection for assert False with argument (PY-7784)
2013-01-25 16:59:55 +04:00
Andrey Vlasovskikh
bd42933bd2
Fixed extract method for fragments with nonlocal variables (PY-6625)
2012-05-23 20:22:38 +04:00
Andrey Vlasovskikh
16448bef80
Don't mark global symbols as inputs of code fragment (PY-6616)
2012-05-22 15:38:36 +04:00
Andrey Vlasovskikh
51ca6d51a1
Rewritten Python code fragment extraction based on CFG (PY-4156, PY-6414)
2012-05-21 18:21:38 +04:00
Andrey Vlasovskikh
12d21d8ecf
Fixed out-of-order for-loop body instruction in Python CFG
2012-05-17 17:57:44 +04:00
Andrey Vlasovskikh
4c1eec6846
Fixed false positive in unreachable code inspection for while-else loops (PY-6159)
2012-04-02 22:03:35 +04:00
Dmitry Jemerov
482d66ad8d
visit type annotations in control flow builder
2012-01-16 18:44:54 +01:00
Dmitry Jemerov
e57db64949
to make sure CFG for bad code is built correctly, visit raw targets of assignment
2012-01-16 18:39:20 +01:00
Dmitry Jemerov
85257c075a
include reads of decorators in control flow graph
2012-01-16 18:21:30 +01:00
Dmitry Jemerov
ef6c5862f7
include read of lambda default parameter value in control flow graph
2012-01-16 17:33:47 +01:00
Dmitry Jemerov
43b6357fa4
include read of function default parameter value in control flow graph
2012-01-16 17:23:59 +01:00
Dmitry Jemerov
60d7a4e5e9
include read of superclass expression in control flow graph
2012-01-16 17:11:01 +01:00
Ekaterina Tuzova
c0b2b413f7
fixed PY-5029 Editable auto stub string
2011-11-22 13:34:30 +01:00
Andrey Vlasovskikh
783c421a55
Fixed loop-exit CFG edges in for-else loops (PY-4239)
2011-11-14 18:26:51 +04:00
Andrey Vlasovskikh
68d5c3a1f1
Don't count type assertion CFG vertices in DFA (PY-4609)
...
Also renamed WRITETYPE vertices to ASSERTTYPE for clarity.
2011-11-14 16:55:44 +04:00
Andrey Vlasovskikh
a6b4168a55
Removed unused 'self' attributes access vertices from CFG and cleaned up unbound varirables inspection (PY-4623)
2011-11-14 16:17:12 +04:00
Andrey Vlasovskikh
2c8a328e78
Added support for not isinstance and not None type assertions (PY-2140)
2011-09-02 13:11:08 +04:00
Andrey Vlasovskikh
5c4c311642
Updated Python CFG builder tests related to try-finally statements
2011-07-18 16:29:23 +04:00
Andrey Vlasovskikh
1cf4b1d876
Separated success and failure control flow for finally clause if no except clauses found (PY-4102)
2011-07-08 22:44:50 +04:00
Andrey Vlasovskikh
a5e38c84e0
Refactored Python try-except CFG builder
2011-07-08 22:44:49 +04:00
Dmitry Jemerov
4bec759ac9
let's not have Ruby code in Python control flow builder testdata
2011-07-01 16:16:53 +02:00
Andrey Vlasovskikh
5cd4809c1a
Fixed bug in CFG for qualified imports (PY-3665)
2011-05-25 16:51:33 +04:00
Andrey Vlasovskikh
3a4a00b90c
Special warnings for unresolved references in try-except ImportError (PY-3639)
2011-05-24 19:33:35 +04:00
Andrey Vlasovskikh
d6ab1ad0b5
Lambda expressions became ScopeOwners and got their own CFG (PY-3532)
2011-05-16 18:47:24 +04:00
Andrey Vlasovskikh
24c1a13db0
Fixed bug in control flow ordering for named function arguments
2011-05-16 18:47:22 +04:00
Andrey Vlasovskikh
566d20977d
Fixed control flow break edges for try-except-finally (PY-3503)
2011-05-13 20:50:25 +04:00