We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62f034d commit 392a37cCopy full SHA for 392a37c
mypy/fastparse.py
@@ -173,8 +173,9 @@ def p() -> AST:
173
re.sub(r"#\s*mypy:\s*ignore(?![-_])", "# type: ignore", s)
174
if t == tokenize.COMMENT
175
else (
176
- s + "{"
+ s[:-1]
177
if is_defective_version
178
+ and hasattr(tokenize, "FSTRING_MIDDLE") #technically redundant as all the defective versions have this, but we'd like to appease the typechecker here
179
and t == tokenize.FSTRING_MIDDLE
180
and s.startswith("\\")
181
and s.endswith("{")
0 commit comments