Skip to content

handle fstring continuation in 3.12 #1182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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