Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#461)
Browse files Browse the repository at this point in the history
updates:
- [github.com/psf/black: 24.1.1 → 24.2.0](psf/black@24.1.1...24.2.0)
  • Loading branch information
pre-commit-ci[bot] authored Feb 13, 2024
1 parent 76a71f4 commit 28fe268
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.2.0
hooks:
- id: black
args:
Expand Down
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 28fe268

Please sign in to comment.