Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (iterative#10238)
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.11 → v0.1.14](astral-sh/ruff-pre-commit@v0.1.11...v0.1.14)

* [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 and BradyJ27 committed Apr 22, 2024
1 parent 3104d90 commit 253d18f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.11'
rev: 'v0.1.14'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 2 additions & 2 deletions dvc/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Annotation:
PARAM_META: ClassVar[str] = "meta"

desc: Optional[str] = None
type: Optional[str] = None # noqa: A003
type: Optional[str] = None
labels: List[str] = field(default_factory=list)
meta: Dict[str, Any] = field(default_factory=dict)

Expand All @@ -31,7 +31,7 @@ class Artifact:

path: str
desc: Optional[str] = None
type: Optional[str] = None # noqa: A003
type: Optional[str] = None
labels: List[str] = field(default_factory=list)
meta: Dict[str, Any] = field(default_factory=dict)

Expand Down
2 changes: 1 addition & 1 deletion dvc/commands/ls/ls_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _load(self, lscolors):
else:
self._codes[code] = color

def format(self, entry): # noqa: A003
def format(self, entry):
text = entry["path"]

if entry.get("isout", False) and "out" in self._codes:
Expand Down
2 changes: 1 addition & 1 deletion dvc/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(self, log_colors: bool = True, show_traceback: bool = False) -> Non
self.log_colors = log_colors
self.show_traceback = show_traceback

def format(self, record) -> str: # noqa: A003, C901
def format(self, record) -> str: # noqa: C901
record.message = record.getMessage()
msg = self.formatMessage(record)

Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def check_graph(
new.check_graph()

@staticmethod
def open(url: Optional[str], *args, **kwargs) -> "Repo": # noqa: A003
def open(url: Optional[str], *args, **kwargs) -> "Repo":
from .open_repo import open_repo

return open_repo(url, *args, **kwargs)
Expand Down
6 changes: 3 additions & 3 deletions dvc/repo/experiments/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ def contains_error(self) -> bool:

@dataclass(frozen=True)
class ExpDep:
hash: Optional[str] # noqa: A003
hash: Optional[str]
size: Optional[int]
nfiles: Optional[int]


@dataclass(frozen=True)
class ExpOut:
hash: Optional[str] # noqa: A003
hash: Optional[str]
size: Optional[int]
nfiles: Optional[int]
use_cache: bool
Expand All @@ -129,7 +129,7 @@ class ExpOut:
@dataclass(frozen=True)
class SerializableError:
msg: str
type: str = "" # noqa: A003
type: str = ""

def dumpd(self) -> Dict[str, Any]:
return asdict(self)
Expand Down
4 changes: 1 addition & 3 deletions dvc/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ def __init__(
}
self.theme = defaultdict(lambda: defaults or {}, theme)

def format( # noqa: A003
self, message: str, style: Optional[str] = None, **kwargs
) -> str:
def format(self, message: str, style: Optional[str] = None, **kwargs) -> str:
from dvc.utils import colorize

return colorize(message, **self.theme[style])
Expand Down

0 comments on commit 253d18f

Please sign in to comment.