You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mypy/fastparse.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -175,15 +175,15 @@ def p() -> AST:
175
175
else (
176
176
s[:-1]
177
177
ifis_defective_version
178
-
andhasattr(
179
-
tokenize, "FSTRING_MIDDLE"
180
-
) # technically redundant as all the defective versions have this, but we'd like to appease the typechecker here
178
+
# Technically redundant hasattr check as all the defective versions are versions that have this attribute, but we'd like to appease the typechecker here:
179
+
andhasattr(tokenize, "FSTRING_MIDDLE")
181
180
andt==tokenize.FSTRING_MIDDLE
182
181
ands.startswith("\\")
183
182
ands.endswith("{")
184
183
elses
185
184
)
186
185
),
186
+
*_#this improves whitespace roundtripping (possibly always making it perfect, for this usecase?)
0 commit comments