From 7babeba4110cd5e7cfd7a08b8a42152bb30bde94 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 22:17:52 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- noxfile.py | 1 + src/dvc_data/hashfile/__init__.py | 1 + src/dvc_data/hashfile/_ignore.py | 6 ++---- src/dvc_data/hashfile/state.py | 1 + src/dvc_data/hashfile/tree.py | 2 +- src/dvc_data/index/index.py | 4 ++-- 6 files changed, 8 insertions(+), 7 deletions(-) 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