gousaiyang
b287476366
Allow unparenthesized walrus in set literals, set comprehensions and indexes
2020-11-27 14:46:54 -08:00
Saiyang Gou
b08b61b578
Allow some unparenthesized syntactic structures in f-string expression part ( #159 )
...
Resolves #157 , #158
2020-11-19 16:32:59 +03:00
Dave Halter
75b467e681
Some more small Python 3 changes
2020-07-25 02:33:24 +02:00
Dave Halter
4f9f193747
Remove some Python 3.5/3.4 references
2020-07-25 02:04:58 +02:00
Dave Halter
86d53add2d
Remove sys.version_info usages that are no longer necessary
2020-07-25 01:53:51 +02:00
Dave Halter
a0662b3b3b
flake8 changes
2020-07-24 16:11:06 +02:00
Batuhan Taskaya
891bfdaa04
Test only python3+
2020-06-04 22:09:04 +03:00
Batuhan Taskaya
5e1828b3f0
Check full error message
2020-06-04 22:02:12 +03:00
Batuhan Taskaya
44cf64a5f7
Improve handling of starred expression on different contexts (load/store)
2020-06-04 21:35:48 +03:00
Batuhan Taskaya
6b0e01c220
Revert trailing comma for 3.6<
2020-05-23 21:17:08 +03:00
Batuhan Taskaya
92396a9a16
allow trailing comma <3.6, test both postive/negative cases
2020-05-23 17:45:20 +03:00
Batuhan Taskaya
fe54800cdd
Check all arguments for unparenthesized generator expressions
...
Previously only the first argument on the argument list checked
against the generator expressions, now all argumnets are controlled.
2020-05-23 16:57:34 +03:00
Dave Halter
6ecd975516
Merge pull request #117 from isidentical/repeated-kwarg-39
...
Show which keyword argument is repeated on 3.9+
2020-05-23 15:15:14 +02:00
Batuhan Taskaya
27a7c16803
assert full message
2020-05-23 15:51:00 +03:00
Batuhan Taskaya
a06521d912
Don't give syntax errors for parenthesised kwargs <3.8
2020-05-23 14:43:43 +02:00
Batuhan Taskaya
216a77dce5
Show which keyword argument is repeated on 3.9+
2020-05-23 14:06:24 +03:00
Batuhan Taskaya
8f46481aaf
Raise violation on starred expressions where the child is a boolean/none
2020-05-23 01:09:38 +03:00
Batuhan Taskaya
077e34be84
Support finally in continue on 3.8+
...
Thanks to [bpo-32489](https://bugs.python.org/issue32489 ) and sadly
for rejection of my [PEP 601](https://www.python.org/dev/peps/pep-0601/ )
finally in continue is supported in 3.8+. I checked the blame and looks
like there was already a commit for the same subject, but that only
changes the test and not actually changes the checker (dfe7fba08e )
2020-05-22 18:47:46 +03:00
Batuhan Taskaya
261132e74c
Add support for 'from __future__ import annotations'
...
PEP 563 brought a new `__future__` import for post-poning evaluation
of annotations that introduced in 3.7. This patch adds support for
that future feature, and removes 'all_feature_names' from that list
since it is not valid a syntax
(`from __future__ import all_feature_names`). Also it fixes a bug
related usage of `ALLOWED_FUTURES` (global and version independant
flags) instead of `allowed_futures` (extended version of the previ
ous flag that has some version specific flags, probably unnoticed)
2020-05-22 17:14:33 +03:00
Jarry Shaw
55531ab65b
Revision on assignment errors ( #97 )
...
* Revision on assignment expression errors
* added rule for __debug__ (should be a keyword)
* reviewed error messages
* added new failing samples
* Adjustment upon Dave's review
* rewind several changes in assignment errors
* patched is_definition: command not found for assignment expressions
* patched Python 2 inconsistent error messages in test_python_errors.py: command not found
2020-01-08 23:07:37 +01:00
Dave Halter
cfef1d74e7
Fix a Python 2.7 issue
2020-01-06 00:02:26 +01:00
Dave Halter
9ee7409d8a
Get rid of Python 3.3 artifacts
2020-01-05 23:59:38 +01:00
Dave Halter
95f353a15f
Merge branch 'rm-2.6' of https://github.com/hugovk/parso
2020-01-05 23:50:20 +01:00
Dave Halter
32584ac731
Merge https://github.com/JarryShaw/parso into master
2019-12-14 22:21:22 +01:00
Jarry Shaw
89c4d959e9
* moved all namedexpr_test related rules to _NamedExprRule
...
* added valid examples
2019-12-14 09:37:16 +01:00
Robin Fourcade
e496b07b63
Fix trailing comma error
2019-12-04 22:59:24 +01:00
Hugo
f6bdba65c0
Drop support for EOL Python 2.6
2019-08-08 14:56:27 +03:00
Dave Halter
b2ab64d8f9
Fix Python 3.8 error issues
2019-04-05 18:30:48 +02:00
Dave Halter
60e4591837
Fix: End detection for strings was mostly wrong, fixes #51
2019-01-23 10:13:25 +01:00
Dave Halter
ef56debb78
Fix f-string escapes, fixes #48
...
The tokenizer was not detecting backslash escapes for f-string endings properly
2019-01-22 22:20:32 +01:00
Dave Halter
cba4f2ccc1
Fix the syntax errors from f-strings
2018-04-07 02:14:35 +02:00
Dave Halter
9d2ce4bcd4
Fix a few fstring error gatherings
2018-04-06 09:50:07 +02:00
Dave Halter
cba82773d4
Small test refactoring, because not all fstrings errors from parso match the CPython equivalents.
2017-08-26 19:18:16 +02:00
Dave Halter
66606403c7
Most fstrings issues should be fixed now.
2017-08-26 19:15:09 +02:00
Dave Halter
820e94e03a
Move the error node checking to a rule.
2017-08-19 12:43:47 +02:00
Dave Halter
e2c97e9675
Skip tests in PyPy that don't make sense to test.
2017-08-06 18:04:31 +02:00
Dave Halter
90edb2d0cf
Move the iter_errors and normalizer methods to grammar.py.
2017-08-06 15:32:50 +02:00
Dave Halter
f4b51d91ee
Add python3.4/3.3 issue 'can use starred expression only as assignment target'.
2017-08-06 01:38:05 +02:00
Dave Halter
97525958b6
Move failing examples to a separate file.
2017-08-06 00:46:05 +02:00
Dave Halter
a2d6336028
General cleanup in syntax error detection. Adding a few comments.
2017-08-05 23:03:39 +02:00
Dave Halter
c3aab1b148
Finally able to delete a function because all the tests were generalized.
2017-08-05 22:55:12 +02:00
Dave Halter
f8314f0dea
Another small refactoring.
2017-08-05 22:47:16 +02:00
Dave Halter
c07ad1dfe3
Move more errors to be used by all versions.
2017-08-05 22:45:53 +02:00
Dave Halter
aae38e2c73
Move more tests.
2017-08-05 22:39:17 +02:00
Dave Halter
63e30843dc
Add 'yield' inside async function' for Python 3.5.
2017-08-05 22:33:11 +02:00
Dave Halter
94570acef7
Move another test to be used by all versions.
2017-08-05 21:38:09 +02:00
Dave Halter
1b235e16e1
Fixing a warning and moving some tests around.
2017-08-05 21:31:13 +02:00
Dave Halter
172a534baa
Move some tests around.
2017-08-05 21:22:21 +02:00
Dave Halter
0513b14225
Write a few more tests.
2017-08-05 21:12:25 +02:00
Dave Halter
57f7c465ce
Add 'too many levels of indentation' issue.
2017-08-05 14:45:47 +02:00