Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] authored Dec 18, 2023
1 parent b25c5bd commit 8a8ba7d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ ci:

repos:
- repo: https://github.com/pycqa/isort
rev: 5.13.1
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 23.12.0
hooks:
- id: black
args:
Expand Down
20 changes: 9 additions & 11 deletions bugbear.py
Original file line number Diff line number Diff line change
Expand Up @@ -1465,17 +1465,15 @@ 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 8a8ba7d

Please sign in to comment.