mirror of
https://github.com/espressif/esptool.git
synced 2025-10-16 14:28:54 +08:00
refactor(style): Comply with black>=24.0.0
This commit is contained in:
@@ -41,6 +41,7 @@ cache:
|
||||
- host_test
|
||||
dependencies: []
|
||||
before_script:
|
||||
- pip install --upgrade pip
|
||||
- pip install -e .[dev] --prefer-binary
|
||||
|
||||
version_check:
|
||||
|
@@ -815,9 +815,11 @@ def image_info(args):
|
||||
print(
|
||||
"Checksum: {:#02x} ({})".format(
|
||||
image.checksum,
|
||||
"valid"
|
||||
if image.checksum == calc_checksum
|
||||
else "invalid - calculated {:02x}".format(calc_checksum),
|
||||
(
|
||||
"valid"
|
||||
if image.checksum == calc_checksum
|
||||
else "invalid - calculated {:02x}".format(calc_checksum)
|
||||
),
|
||||
)
|
||||
)
|
||||
try:
|
||||
@@ -941,9 +943,11 @@ def image_info(args):
|
||||
print(
|
||||
"Checksum: {:02x} ({})".format(
|
||||
image.checksum,
|
||||
"valid"
|
||||
if image.checksum == calc_checksum
|
||||
else "invalid - calculated {:02x}".format(calc_checksum),
|
||||
(
|
||||
"valid"
|
||||
if image.checksum == calc_checksum
|
||||
else "invalid - calculated {:02x}".format(calc_checksum)
|
||||
),
|
||||
)
|
||||
)
|
||||
try:
|
||||
|
@@ -1651,12 +1651,14 @@ class HexFormatter(object):
|
||||
while len(s) > 0:
|
||||
line = s[:16]
|
||||
ascii_line = "".join(
|
||||
c
|
||||
if (
|
||||
c == " "
|
||||
or (c in string.printable and c not in string.whitespace)
|
||||
(
|
||||
c
|
||||
if (
|
||||
c == " "
|
||||
or (c in string.printable and c not in string.whitespace)
|
||||
)
|
||||
else "."
|
||||
)
|
||||
else "."
|
||||
for c in line.decode("ascii", "replace")
|
||||
)
|
||||
s = s[16:]
|
||||
|
Reference in New Issue
Block a user