Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#515)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.7 → v0.3.2](astral-sh/ruff-pre-commit@v0.1.7...v0.3.2)
- [github.com/asottile/pyupgrade: v3.15.0 → v3.15.1](asottile/pyupgrade@v3.15.0...v3.15.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Mar 13, 2024
1 parent b547d73 commit 84ee44b
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Automation using nox."""

import glob
import os

Expand Down
1 change: 1 addition & 0 deletions src/dvc_data/hashfile/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""DVC data."""

import logging
from collections.abc import Iterator
from typing import TYPE_CHECKING, Union, cast
Expand Down
6 changes: 2 additions & 4 deletions src/dvc_data/hashfile/_ignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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): ...
1 change: 1 addition & 0 deletions src/dvc_data/hashfile/state.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Manages state database used for checksum caching."""

import json
import logging
import os
Expand Down
2 changes: 1 addition & 1 deletion src/dvc_data/hashfile/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/dvc_data/index/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 84ee44b

Please sign in to comment.