diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 468bcd88..b9156e3a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: sort-simple-yaml - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.1.7' + rev: 'v0.3.2' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -31,7 +31,7 @@ repos: - id: codespell additional_dependencies: ["tomli"] - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.15.1 hooks: - id: pyupgrade args: [--py38-plus] diff --git a/noxfile.py b/noxfile.py index 07dce37a..efffb854 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,4 +1,5 @@ """Automation using nox.""" + import glob import os diff --git a/src/dvc_data/hashfile/__init__.py b/src/dvc_data/hashfile/__init__.py index 99668720..6086608e 100644 --- a/src/dvc_data/hashfile/__init__.py +++ b/src/dvc_data/hashfile/__init__.py @@ -1,4 +1,5 @@ """DVC data.""" + import logging from collections.abc import Iterator from typing import TYPE_CHECKING, Union, cast diff --git a/src/dvc_data/hashfile/_ignore.py b/src/dvc_data/hashfile/_ignore.py index d5d1d1db..30e4bd0c 100644 --- a/src/dvc_data/hashfile/_ignore.py +++ b/src/dvc_data/hashfile/_ignore.py @@ -8,8 +8,6 @@ class Ignore(Protocol): - def find(self, fs: "FileSystem", path: "AnyFSPath") -> Iterator["AnyFSPath"]: - ... + def find(self, fs: "FileSystem", path: "AnyFSPath") -> Iterator["AnyFSPath"]: ... - def walk(self, fs: "FileSystem", path: "AnyFSPath", **kwargs: Any): - ... + def walk(self, fs: "FileSystem", path: "AnyFSPath", **kwargs: Any): ... diff --git a/src/dvc_data/hashfile/state.py b/src/dvc_data/hashfile/state.py index 557680ea..bb6ef761 100644 --- a/src/dvc_data/hashfile/state.py +++ b/src/dvc_data/hashfile/state.py @@ -1,4 +1,5 @@ """Manages state database used for checksum caching.""" + import json import logging import os diff --git a/src/dvc_data/hashfile/tree.py b/src/dvc_data/hashfile/tree.py index 75361f37..b4e28da8 100644 --- a/src/dvc_data/hashfile/tree.py +++ b/src/dvc_data/hashfile/tree.py @@ -212,7 +212,7 @@ def load(cls, odb, hash_info, hash_name: Optional[str] = None) -> "Tree": return tree - def filter(self, prefix: tuple[str]) -> Optional["Tree"]: # noqa: A003 + def filter(self, prefix: tuple[str]) -> Optional["Tree"]: """Return a filtered copy of this tree that only contains entries inside prefix. diff --git a/src/dvc_data/index/index.py b/src/dvc_data/index/index.py index 71bc5156..97069d3a 100644 --- a/src/dvc_data/index/index.py +++ b/src/dvc_data/index/index.py @@ -86,7 +86,7 @@ def _trie(self): return SQLiteTrie() @classmethod - def open(cls, path): # noqa: A003 + def open(cls, path): ret = cls() ret._trie = SQLiteTrie.open(path) return ret @@ -642,7 +642,7 @@ def _onerror(_, exc): self.update(*args, **kwargs) @classmethod - def open(cls, path): # noqa: A003 + def open(cls, path): ret = cls() ret._trie = DataIndexTrie.open(path) return ret