mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
[pre-commit.ci] pre-commit autoupdate (#10238)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.11 → v0.1.14](https://github.com/astral-sh/ruff-pre-commit/compare/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>
This commit is contained in:
@@ -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]
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class 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:
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ class ColorFormatter(logging.Formatter):
|
||||
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)
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ class Repo:
|
||||
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)
|
||||
|
||||
@@ -112,14 +112,14 @@ class SerializableExp:
|
||||
|
||||
@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
|
||||
@@ -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)
|
||||
|
||||
+1
-3
@@ -57,9 +57,7 @@ class Formatter:
|
||||
}
|
||||
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])
|
||||
|
||||
Reference in New Issue
Block a user