diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 87bdb3544..b77fcb47b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,7 +43,7 @@ repos: exclude: "asdf/(extern||_jsonschema)/.*" - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.0.282' + rev: 'v0.0.287' hooks: - id: ruff args: ["--fix"] @@ -54,11 +54,11 @@ repos: - id: black - repo: https://github.com/asottile/blacken-docs - rev: '1.15.0' + rev: '1.16.0' hooks: - id: blacken-docs - repo: https://github.com/abravalheri/validate-pyproject - rev: "v0.13" + rev: "v0.14" hooks: - id: validate-pyproject diff --git a/asdf/_tests/test_array_blocks.py b/asdf/_tests/test_array_blocks.py index c96eebc74..0bc37ca8c 100644 --- a/asdf/_tests/test_array_blocks.py +++ b/asdf/_tests/test_array_blocks.py @@ -445,7 +445,7 @@ def test_checksum(tmp_path): ff.write_to(path) with asdf.open(path, validate_checksums=True) as ff: - assert type(ff._blocks._internal_blocks[0].checksum) == bytes + assert isinstance(ff._blocks._internal_blocks[0].checksum, bytes) assert ff._blocks._internal_blocks[0].checksum == b"\xcaM\\\xb8t_L|\x00\n+\x01\xf1\xcfP1" diff --git a/asdf/_tests/test_info.py b/asdf/_tests/test_info.py index 8c50d2806..932db9107 100644 --- a/asdf/_tests/test_info.py +++ b/asdf/_tests/test_info.py @@ -78,12 +78,12 @@ def __init__(self, clown="", the_meaning=0, anyof=None, allof=None, oneof=None, self.patt = {} for key in kw: if re.search("^S_", key): - if type(kw[key]) != str: + if not isinstance(kw[key], str): msg = "S_ pattern object must be a string" raise ValueError(msg) self.patt[key] = kw[key] if re.search("^I_", key): - if type(kw[key]) != int: + if not isinstance(kw[key], int): msg = "I_ pattern object must be an int" raise ValueError(msg) self.patt[key] = kw[key] diff --git a/asdf/config.py b/asdf/config.py index bd0dc8407..6284d544b 100644 --- a/asdf/config.py +++ b/asdf/config.py @@ -343,18 +343,12 @@ def validate_on_read(self, value): def __repr__(self): return ( "" - ).format( - self.array_inline_threshold, - self.default_version, - self.io_block_size, - self.legacy_fill_schema_defaults, - self.validate_on_read, )