Skip to content

Commit

Permalink
Merge pull request #333 from dstansby/pre-commit
Browse files Browse the repository at this point in the history
Update and fix pre-commit
  • Loading branch information
joshmoore committed Jan 17, 2024
2 parents 9d247f4 + b45006d commit f2160a7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
25 changes: 8 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: [
Expand All @@ -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
6 changes: 6 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[mypy]
disallow_untyped_defs = False
ignore_missing_imports = True

[mypy-ome_zarr]
disallow_untyped_defs = True
2 changes: 1 addition & 1 deletion ome_zarr/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f2160a7

Please sign in to comment.