Skip to content

Commit 909b044

Browse files
committed
"Update ruff pre-commit hook
"
1 parent f548703 commit 909b044

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: end-of-file-fixer
1111
- id: trailing-whitespace
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.3.4
13+
rev: v0.15.8
1414
hooks:
1515
- id: ruff-format
1616
- id: ruff

adafruit_pn532/adafruit_pn532.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,11 @@ def mifare_classic_get_value_block(self, block_number: int) -> int:
539539
value_backup = block[8:12]
540540
if value != value_backup:
541541
raise RuntimeError(
542-
"Value block bytes 0-3 do not match 8-11: " + "".join("%02x" % b for b in block)
542+
"Value block bytes 0-3 do not match 8-11: " + "".join(f"{b:02x}" for b in block)
543543
)
544544
if value_inverted != bytearray(map((lambda x: x ^ 0xFF), value)):
545545
raise RuntimeError(
546-
"Inverted value block bytes 4-7 not valid: " + "".join("%02x" % b for b in block)
546+
"Inverted value block bytes 4-7 not valid: " + "".join(f"{b:02x}" for b in block)
547547
)
548548

549549
return struct.unpack("<i", value)[0]

0 commit comments

Comments
 (0)