Skip to content

Commit

Permalink
Merge pull request #1182 from PyCQA/312-continuation
Browse files Browse the repository at this point in the history
handle fstring continuation in 3.12
  • Loading branch information
asottile committed Jul 29, 2023
2 parents 706ae9d + e0c1069 commit d6ce7dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pycodestyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ def continued_indentation(logical_line, tokens, indent_level, hang_closing,
if verbose >= 4:
print(f"bracket depth {depth} indent to {start[1]}")
# deal with implicit string concatenation
elif token_type in (tokenize.STRING, tokenize.COMMENT):
elif token_type in (tokenize.STRING, tokenize.COMMENT, FSTRING_START):
indent_chances[start[1]] = str
# visual indent after assert/raise/with
elif not row and not depth and text in ["assert", "raise", "with"]:
Expand Down
3 changes: 3 additions & 0 deletions testing/data/E12not.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,9 @@ def unicode2html(s):
help = br"print total number of errors " \
br"to standard error"

help = f"print total number of errors " \
f"to standard error"

d = dict('foo', help="exclude files or directories which match these "
"comma separated patterns (default: %s)" %
DEFAULT_EXCLUDE)
Expand Down

0 comments on commit d6ce7dc

Please sign in to comment.