Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 13, 2024
1 parent 7f53cc1 commit 03ff066
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions bugbear.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,15 +1495,17 @@ def myunparse(node: ast.AST) -> str: # pragma: no cover
format_specifier = re.sub(r"\.\d*", "", format_specifier)

# skip if any invalid characters in format spec
invalid_characters = "".join((
"=", # align character only valid for numerics
"+- ", # sign
"0123456789", # width digits
"z", # coerce negative zero floating point to positive
"#", # alternate form
"_,", # thousands grouping
"bcdeEfFgGnoxX%", # various number specifiers
))
invalid_characters = "".join(
(
"=", # align character only valid for numerics
"+- ", # sign
"0123456789", # width digits
"z", # coerce negative zero floating point to positive
"#", # alternate form
"_,", # thousands grouping
"bcdeEfFgGnoxX%", # various number specifiers
)
)
if set(format_specifier).intersection(invalid_characters):
current_mark = variable = None
continue
Expand Down

0 comments on commit 03ff066

Please sign in to comment.