Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PyPy
pypy
Commits
aecc30d586d3
Commit
92788fef
authored
Jul 26, 2021
by
isidentical
Browse files
pyparser: ensure all tokens are unique for type ignores
--HG-- branch : py3.8-isidentical-ast-feature-version
parent
e30da78a4ef7
Pipeline
#25179
failed with stage
in 13 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pypy/interpreter/pyparser/pyparse.py
View file @
aecc30d5
...
...
@@ -214,7 +214,8 @@ class PythonParser(parser.Parser):
next_token_seen
=
token
# Special handling for TYPE_IGNOREs
if
token
.
token_type
==
pygram
.
tokens
.
TYPE_IGNORE
:
self
.
type_ignores
.
append
(
token
)
if
token
not
in
self
.
type_ignores
:
self
.
type_ignores
.
append
(
token
)
elif
self
.
add_token
(
token
):
break
last_token_seen
=
token
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment