Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and braingram committed Aug 9, 2023
1 parent fb7f769 commit f026439
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sphinx_asdf/asdf2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def run(self):
else:
return []


def _block_to_string(block):
if hasattr(block, "header"):
header = block.header
Expand Down Expand Up @@ -75,7 +76,7 @@ def _block_to_string(block):
human_flags.append(val)
if len(human_flags):
lines.append(" flags: {}".format(" | ".join(human_flags)))
if header["compression"] and header["compression"] != b'\0\0\0\0':
if header["compression"] and header["compression"] != b"\0\0\0\0":
lines.append(f" compression: {header['compression']}")
lines.append(f" allocated_size: {header['allocated_size']}")
lines.append(f" used_size: {header['used_size']}")
Expand Down Expand Up @@ -134,7 +135,7 @@ def run(self):

if show_bocks:
with asdf.open(filename, **kwargs) as ff:
if hasattr(ff._blocks, 'internal_blocks'):
if hasattr(ff._blocks, "internal_blocks"):
blocks = list(ff._blocks.internal_blocks)
else:
blocks = ff._blocks.blocks
Expand Down

0 comments on commit f026439

Please sign in to comment.