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