diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ad0889af..284c6fe9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,20 +12,20 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.11.0 hooks: - id: black args: [--target-version=py36] - repo: https://github.com/asottile/pyupgrade - rev: v3.9.0 + rev: v3.15.0 hooks: - id: pyupgrade args: - --py36-plus - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: trailing-whitespace exclude: .bumpversion.cfg @@ -45,7 +45,7 @@ repos: - --autofix - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 additional_dependencies: [ @@ -66,28 +66,19 @@ repos: ] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.4.1 + rev: v1.7.1 hooks: - id: mypy - - - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.4.1 - hooks: - - id: mypy - args: [ - --disallow-untyped-defs, - --ignore-missing-imports, - ] - exclude: tests/|setup.py + args: [--config-file=mypy.ini] - repo: https://github.com/adrienverge/yamllint.git - rev: v1.32.0 + rev: v1.33.0 hooks: - id: yamllint # args: [--config-data=relaxed] # - repo: https://github.com/codespell-project/codespell - rev: v2.2.5 + rev: v2.2.6 hooks: - id: codespell diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 00000000..4bb4b35c --- /dev/null +++ b/mypy.ini @@ -0,0 +1,6 @@ +[mypy] +disallow_untyped_defs = False +ignore_missing_imports = True + +[mypy-ome_zarr] +disallow_untyped_defs = True diff --git a/ome_zarr/io.py b/ome_zarr/io.py index 6529d76a..eaf17850 100644 --- a/ome_zarr/io.py +++ b/ome_zarr/io.py @@ -112,7 +112,7 @@ def load(self, subpath: str = "") -> da.core.Array: return da.from_zarr(self.__store, subpath) def __eq__(self, rhs: object) -> bool: - if type(self) != type(rhs): + if type(self) is not type(rhs): return False if not isinstance(rhs, ZarrLocation): return False