Skip to content

Commit e0c1069

Browse files
committed
handle fstring continuation in 3.12
1 parent 706ae9d commit e0c1069

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pycodestyle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ def continued_indentation(logical_line, tokens, indent_level, hang_closing,
686686
if verbose >= 4:
687687
print(f"bracket depth {depth} indent to {start[1]}")
688688
# deal with implicit string concatenation
689-
elif token_type in (tokenize.STRING, tokenize.COMMENT):
689+
elif token_type in (tokenize.STRING, tokenize.COMMENT, FSTRING_START):
690690
indent_chances[start[1]] = str
691691
# visual indent after assert/raise/with
692692
elif not row and not depth and text in ["assert", "raise", "with"]:

testing/data/E12not.py

+3
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ def unicode2html(s):
435435
help = br"print total number of errors " \
436436
br"to standard error"
437437

438+
help = f"print total number of errors " \
439+
f"to standard error"
440+
438441
d = dict('foo', help="exclude files or directories which match these "
439442
"comma separated patterns (default: %s)" %
440443
DEFAULT_EXCLUDE)

0 commit comments

Comments
 (0)