From f0264391f89d556132cc3a928bbb31ae9c08dfea Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 16 May 2023 15:33:05 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sphinx_asdf/asdf2rst.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sphinx_asdf/asdf2rst.py b/sphinx_asdf/asdf2rst.py index efe62ba..6513493 100644 --- a/sphinx_asdf/asdf2rst.py +++ b/sphinx_asdf/asdf2rst.py @@ -45,6 +45,7 @@ def run(self): else: return [] + def _block_to_string(block): if hasattr(block, "header"): header = block.header @@ -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']}") @@ -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