diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bc1c51042..cee4abede 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: - id: text-unicode-replacement-char - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: ["--write-changes"] @@ -43,22 +43,22 @@ repos: exclude: "asdf/(extern||_jsonschema)/.*" - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.3.5' + rev: 'v0.6.8' hooks: - id: ruff args: ["--fix"] - repo: https://github.com/psf/black - rev: 24.3.0 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/asottile/blacken-docs - rev: '1.16.0' + rev: '1.18.0' hooks: - id: blacken-docs - repo: https://github.com/abravalheri/validate-pyproject - rev: "v0.16" + rev: "v0.20.2" hooks: - id: validate-pyproject diff --git a/asdf/_tests/test_file_format.py b/asdf/_tests/test_file_format.py index 954da0721..16f0aad48 100644 --- a/asdf/_tests/test_file_format.py +++ b/asdf/_tests/test_file_format.py @@ -22,7 +22,6 @@ def test_no_yaml_end_marker(tmp_path): pass buff.seek(0) - fd = generic_io.InputStream(buff, "r") with pytest.raises(ValueError, match=r"End of YAML marker not found"), asdf.open(buff): pass diff --git a/asdf/_tests/test_lazy_nodes.py b/asdf/_tests/test_lazy_nodes.py index fa8a9fd60..6d242d121 100644 --- a/asdf/_tests/test_lazy_nodes.py +++ b/asdf/_tests/test_lazy_nodes.py @@ -119,7 +119,7 @@ def test_node_inheritance(NodeClass, data, base): ) def test_node_empty_init(NodeClass, base): node = NodeClass() - assert type(node.tagged) == base + assert type(node.tagged) is base @pytest.mark.parametrize( diff --git a/asdf/_tests/test_tagged.py b/asdf/_tests/test_tagged.py index a98de2790..9c8298b32 100644 --- a/asdf/_tests/test_tagged.py +++ b/asdf/_tests/test_tagged.py @@ -43,7 +43,7 @@ def test_tagged_list_base(): assert isinstance(value.base, list) assert not isinstance(value.base, TaggedList) - assert value.base.__class__ == list + assert value.base.__class__ is list def test_tagged_dict_deepcopy(): @@ -83,7 +83,7 @@ def test_tagged_dict_base(): assert isinstance(value.base, dict) assert not isinstance(value.base, TaggedDict) - assert value.base.__class__ == dict + assert value.base.__class__ is dict def test_tagged_string_deepcopy(): @@ -116,7 +116,7 @@ def test_tagged_string_base(): assert isinstance(value.base, str) assert not isinstance(value.base, TaggedString) - assert value.base.__class__ == str + assert value.base.__class__ is str ASDF_UNIT_TAG = "stsci.edu:asdf/unit/unit-1.0.0" diff --git a/asdf/extension/_manager.py b/asdf/extension/_manager.py index cb6a10d2c..d02b35600 100644 --- a/asdf/extension/_manager.py +++ b/asdf/extension/_manager.py @@ -82,7 +82,7 @@ def __init__(self, extensions): # imported. We don't want to do this unnecessarily and since # class instances do not contain the public class path # we adopt a strategy of checking class paths and only - # registering those that have already been imported. Thiss + # registering those that have already been imported. This # is ok because asdf will only use the converter type # when attempting to serialize an object in memory (so the # public class path will already be imported at the time diff --git a/requirements-dev.txt b/requirements-dev.txt index b9fdd75fb..1ddb3871d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,7 +4,3 @@ git+https://github.com/yaml/pyyaml.git git+https://github.com/python-attrs/attrs numpy>=0.0.dev0 -# although we don't use scipy, we include it here so that any dependency -# that uses it during these tests will use the development version -# which is more likely to work with the above development version of numpy -scipy>=0.0.dev0