Mikhail Golubev
208cd7c2d5
PY-20776 Do not warn about empty expression fragment at the end of f-string
...
Error about missing right brace seems to be enough in this case, no need
to stack messages about the same text range.
2016-10-05 16:11:37 +03:00
Mikhail Golubev
94369babf1
PY-20776 PY-20775 PY-20773 Do not highlight empty ranges inside f-strings
...
Such errors are difficult to spot because most of the time the
corresponding markers are displayed only in the right gutter, not in
the editor (though, sometimes a single character is highlighted for
some reason).
For an empty expression fragment the whole its content range is
highlighted (from "{" to either "!", ":" or "}").
For the first unclosed expression fragment the range from "{" to the
end of the containing string node is highlighted.
In case of a missing conversion character the character "!" itself is
highlighted.
2016-10-05 16:11:37 +03:00
Mikhail Golubev
2dfb0f8d48
PY-20901 Warn about too deeply nested expression fragments inside f-strings
2016-10-05 16:11:37 +03:00
Mikhail Golubev
5564532c70
PY-20773 Do not warn about '#' inside string literals embedded in expression fragments
...
Also the annotator highlights the whole expression fragment after '#'
not individual hash signs and warns about line comments instead of
prohibited characters.
2016-10-05 16:11:37 +03:00
Mikhail Golubev
168bb52083
PY-20897 Detect and warn about single '}' inside f-strings
2016-10-05 16:11:37 +03:00
Semyon Proshev
bd19e02dd5
PY-20770 Fixed: Support Python 3.6 asynchronous generators and comprehensions
...
Update CompatibilityVisitor to highlight "await" inside comprehensions in Python 3.5
2016-09-30 18:09:37 +03:00
Semyon Proshev
464ade6789
PY-20770 Fixed: Support Python 3.6 asynchronous generators and comprehensions
...
Update CompatibilityVisitor to highlight "async" inside comprehensions and generator expressions in Pythons < 3.6
2016-09-30 18:06:02 +03:00
Semyon Proshev
d74244f6ac
PY-20770 Fixed: Support Python 3.6 asynchronous generators and comprehensions
...
Introduce fake __asyncgenerator type for async generator objects described in PEP 525.
Update PyFunctionImpl.createCoroutineType to convert __generator to __asyncgenerator.
Update PyTargetExpressionImpl.getIterationType to infer type of elements which are getting from async generator
Highlight non-empty return inside async generators as error
2016-09-30 18:04:58 +03:00
Semyon Proshev
0e61667352
PY-20770 Fixed: Support Python 3.6 asynchronous generators and comprehensions
...
Update highlighting and compatibility visitor to correctly process async generators described in PEP 525
2016-09-30 17:59:50 +03:00
Mikhail Golubev
654ac30429
PY-20844 PY-20773 Warn about '#' signs and backslashes inside f-strings
2016-09-26 09:09:23 +03:00
Mikhail Golubev
7196817a77
PY-20776 Warn expression parts that contain only whitespaces
2016-09-26 09:09:23 +03:00
Mikhail Golubev
6ea142ef97
PY-20778 Report illegal conversion characters after '!' inside f-strings
2016-09-26 09:09:23 +03:00
Mikhail Golubev
6ec6eccb64
PY-20775 Report missing closing brace for expression parts inside f-strings
...
Also fixed detection of closing brace after conversion characters and
format specifiers inside expression parts.
2016-09-26 09:09:23 +03:00
Mikhail Golubev
7f134f8908
PY-20776 Report empty expression fragments inside f-strings
2016-09-26 09:09:23 +03:00
Mikhail Golubev
b16311ef60
PY-18972 Initial support of f-string literals
...
Namely, Python lexer, compatibility inspection and unsupported
features annotator are aware of them now.
2016-09-16 08:16:26 +03:00
Mikhail Golubev
a48947ab01
PY-20744 Warn about illegal targets for variable annotations
2016-09-16 08:16:26 +03:00
Mikhail Golubev
409aad3f71
PY-20744 Compatibility inspection and annotator warn about variable annotations
2016-09-16 08:16:26 +03:00
Semyon Proshev
90a381b2f1
PY-20662 Fixed: Making any magic method async displays an error, even though it is sometimes legal
...
Mark __call__ builtin as allowed to be async
2016-09-15 19:20:12 +03:00
Semyon Proshev
0dd39f3f80
Update CompatibilityVisitor to highlight and suggest quick fix for underscores in numeric literals in Pythons < 3.6
...
As a result compatibility inspection warns about underscores for Pythons < 3.6
2016-09-13 15:35:31 +03:00
Semyon Proshev
389902961b
Update CompatibilityVisitor to correctly handle Implicit oct (without o or O) long integers
2016-09-13 15:35:31 +03:00
Lada Gagina
49caa2b777
PY-19927 Add highlighting to __setstate__ and __sizeof__ magic methods
2016-08-10 15:32:04 +03:00
Semyon Proshev
aacd5e6781
Fix Py3UnresolvedReferencesInspectionTest.testAsyncInitMethod and PythonHighlightingTest.testAsyncBuiltinMethods
2016-08-02 21:15:05 +03:00
Semyon Proshev
30381b3b10
PY-19775 Fixed: Unresolved attribute reference on attribute defined inside async def __init__
...
Highlight builtin methods (except __aiter__, __aenter__, __aexit__, __anext__) which are not allowed to be async
2016-08-01 21:28:24 +03:00
Semyon Proshev
eb2bd8cae4
PY-19679 Fixed: "await" in list comprehension is not marked as a syntax error
...
Update DumbAwareHighlightingAnnotator to mark await in result expressions as errors
2016-07-08 13:47:38 +03:00
Andrey Vlasovskikh
30c936a46d
Fixed warnings for star unpacking in set literals
2015-09-14 15:22:58 +03:00
Andrey Vlasovskikh
57a4d381e3
Updated star expression annotator to allow * unpacking in tuples and lists
2015-09-14 14:45:40 +03:00
Andrey Vlasovskikh
e2d75292f0
Annotate 'yield' inside async functions as errors (PY-16094)
2015-09-08 15:03:39 +03:00
Andrey Vlasovskikh
c855959143
Parse and highlight the 'await' keyword (PY-16094)
2015-09-08 14:21:52 +03:00
Andrey Vlasovskikh
4439b41170
Updated test data
2015-09-08 12:25:10 +03:00
Andrey Vlasovskikh
d616d70c50
Parse and highlight the 'async' keyword (PY-16094)
...
We had to switch to stack-based parsing contexts in order to be able
to use context-sensitive token filtering for 'async'.
Also this commit fixes the highlighting annotator issue with blinking
names of the functions and blinking 'async'.
2015-09-06 20:04:50 +03:00
Mikhail Golubev
bb0c3b4cab
PY-11481 Correctly detect escaped quotes at the end of string literals
2014-09-01 13:30:35 +04:00
Ekaterina Tuzova
61ec21d0e1
fixed PY-13720 PyCharm incorrectly identifies syntax error for Python 3.4
2014-08-25 12:34:25 +04:00
Andrey Vlasovskikh
99c6577bd7
Fixed false positive for 'yield' expressions in lambdas (PY-11663)
2014-05-23 20:46:56 +04:00
Andrey Vlasovskikh
5de561b885
Fixed false negative for 'yield' expressions in default values of parameters
2014-05-23 20:40:51 +04:00
Ekaterina Tuzova
4e914225b4
fixed PY-11340 Invalid case for can't assign to literal inspection
2014-01-23 17:53:05 +04:00
Dmitry Jemerov
a558b1d5d3
highlight star expression used outside of assignment context (PY-10177)
2013-10-31 21:00:20 +01:00
Andrey Vlasovskikh
d7b81f04d4
Fixed test data files capitalization
2013-04-17 17:23:23 +04:00
Ekaterina Tuzova
ab9622ffc6
fixed PY-9274 Broken raw bytes literal parsing for Python 3.3
...
refactored lexer, added compatibility warnings, quickfix to remove not only U prefix
2013-03-29 16:44:08 +04:00
Dmitry Jemerov
5e80806668
don't highlight Java methods as not callable (PY-9037)
2013-03-04 15:14:46 +01:00
Dmitry Jemerov
066ddf137d
allow each instance of PyCallableType to tell whether it's actually callable or not; distinguish class definition and class instance for Java class types; correctly treat Java constructors as callable (PY-4269)
2013-02-27 16:09:37 +01:00
Ekaterina Tuzova
2d801a8dba
fixed PY-8025 Enable rest, epytext and doctest highlighting in strings literal assigned to __doc__
2013-02-20 15:47:57 +04:00
Dmitry Jemerov
c7eeb6d5ee
highlight assignments as 'with' statement target as error (PY-7529)
2012-12-13 20:21:09 +01:00
Dmitry Jemerov
e04ae9a185
check for multiple * parameters in parameter list (PY-6456)
2012-08-07 14:55:35 +02:00
Dmitry Jemerov
ac79b9b143
highlight "Generator expression must be parenthesized if not sole argument" (PY-6926)
2012-08-07 12:58:27 +02:00
Andrey Vlasovskikh
11740d001b
Allow 'return' with arguments inside generators in Python 3.3 (PY-6702)
2012-06-05 16:10:12 +04:00
Andrey Vlasovskikh
b9939f1601
Support 'yield from' syntax (PY-6702)
2012-06-05 15:41:35 +04:00
Andrey Vlasovskikh
56a0c67e4a
Don't highlight Unicode literals in Python 3.3 as errors (PY-6703)
2012-06-04 22:04:38 +04:00
Dmitry Jemerov
6eb5664191
test fix
2011-11-25 17:56:17 +01:00
Dmitry Jemerov
6ba7fdeea1
test fix
2011-09-20 19:55:35 +02:00
Dmitry Jemerov
74e1094d76
get rid of ParentMatcher and Matcher altogether
2011-09-12 18:20:08 +02:00