mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 23:10:42 +01:00
ruff: ban relative parent/grandparent imports (#8794)
This commit is contained in:
+2
-4
@@ -131,10 +131,8 @@ def _sigshow(_, frame: Optional["FrameType"]) -> None:
|
||||
from traceback import format_stack
|
||||
|
||||
lines = "\u2015" * get_terminal_size().columns
|
||||
file = sys.stderr
|
||||
print( # noqa: T201
|
||||
lines, "\n", *format_stack(frame), lines, sep="", file=file
|
||||
)
|
||||
stack = format_stack(frame)
|
||||
print(lines, "\n", *stack, lines, sep="", file=sys.stderr) # noqa: T201
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
||||
+1
-2
@@ -3,11 +3,10 @@ import logging
|
||||
|
||||
from dvc.cli import completion
|
||||
from dvc.cli.command import CmdBaseNoRepo
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.scm import CloneError
|
||||
|
||||
from ..cli.utils import append_doc_link
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -3,10 +3,9 @@ import logging
|
||||
|
||||
from dvc.cli import completion
|
||||
from dvc.cli.command import CmdBaseNoRepo
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
from ..cli.utils import append_doc_link
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -4,11 +4,10 @@ from typing import List, Mapping, Optional
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.commands.experiments.show import format_time
|
||||
from dvc.compare import TabularData
|
||||
from dvc.ui import ui
|
||||
|
||||
from ..experiments.show import format_time
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
+11
-6
@@ -6,18 +6,23 @@ from typing import TYPE_CHECKING, Any, Iterator, List
|
||||
|
||||
import colorama
|
||||
|
||||
from dvc.ui import ui
|
||||
|
||||
from ..exceptions import (
|
||||
from dvc.exceptions import (
|
||||
CacheLinkError,
|
||||
InvalidArgumentError,
|
||||
OutputDuplicationError,
|
||||
OverlappingOutputPathsError,
|
||||
RecursiveAddingWhileUsingFilename,
|
||||
)
|
||||
from ..repo.scm_context import scm_context
|
||||
from ..utils import LARGE_DIR_SIZE, glob_targets, resolve_output, resolve_paths
|
||||
from ..utils.collections import ensure_list, validate
|
||||
from dvc.repo.scm_context import scm_context
|
||||
from dvc.ui import ui
|
||||
from dvc.utils import (
|
||||
LARGE_DIR_SIZE,
|
||||
glob_targets,
|
||||
resolve_output,
|
||||
resolve_paths,
|
||||
)
|
||||
from dvc.utils.collections import ensure_list, validate
|
||||
|
||||
from . import locked
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -25,14 +25,21 @@ from scmrepo.exceptions import SCMError
|
||||
|
||||
from dvc.env import DVC_EXP_AUTO_PUSH, DVC_EXP_GIT_REMOTE
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.repo.experiments.exceptions import (
|
||||
CheckpointExistsError,
|
||||
ExperimentExistsError,
|
||||
)
|
||||
from dvc.repo.experiments.refs import (
|
||||
EXEC_BASELINE,
|
||||
EXEC_BRANCH,
|
||||
EXEC_CHECKPOINT,
|
||||
ExpRefInfo,
|
||||
)
|
||||
from dvc.stage.serialize import to_lockfile
|
||||
from dvc.ui import ui
|
||||
from dvc.utils import dict_sha256, env2bool, relpath
|
||||
from dvc.utils.fs import remove
|
||||
|
||||
from ..exceptions import CheckpointExistsError, ExperimentExistsError
|
||||
from ..refs import EXEC_BASELINE, EXEC_BRANCH, EXEC_CHECKPOINT, ExpRefInfo
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from queue import Queue
|
||||
|
||||
|
||||
@@ -9,10 +9,7 @@ from scmrepo.exceptions import SCMError as _SCMError
|
||||
from shortuuid import uuid
|
||||
|
||||
from dvc.lock import LockError
|
||||
from dvc.scm import SCM, GitMergeError
|
||||
from dvc.utils.fs import makedirs, remove
|
||||
|
||||
from ..refs import (
|
||||
from dvc.repo.experiments.refs import (
|
||||
EXEC_APPLY,
|
||||
EXEC_BASELINE,
|
||||
EXEC_BRANCH,
|
||||
@@ -23,15 +20,17 @@ from ..refs import (
|
||||
EXPS_TEMP,
|
||||
ExpRefInfo,
|
||||
)
|
||||
from ..utils import EXEC_TMP_DIR, get_exp_rwlock
|
||||
from dvc.repo.experiments.utils import EXEC_TMP_DIR, get_exp_rwlock
|
||||
from dvc.scm import SCM, GitMergeError
|
||||
from dvc.utils.fs import makedirs, remove
|
||||
|
||||
from .base import BaseExecutor, TaskStatus
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from scmrepo.git import Git
|
||||
|
||||
from dvc.repo import Repo
|
||||
|
||||
from ..stash import ExpStashEntry
|
||||
from dvc.repo.experiments.stash import ExpStashEntry
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -83,7 +82,7 @@ class TempDirExecutor(BaseLocalExecutor):
|
||||
):
|
||||
from dulwich.repo import Repo as DulwichRepo
|
||||
|
||||
from ..utils import push_refspec
|
||||
from dvc.repo.experiments.utils import push_refspec
|
||||
|
||||
DulwichRepo.init(os.fspath(self.root_dir))
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, Callable, Iterable, Optional
|
||||
from dvc_ssh import SSHFileSystem
|
||||
from funcy import first
|
||||
|
||||
from ..refs import (
|
||||
from dvc.repo.experiments.refs import (
|
||||
EXEC_BASELINE,
|
||||
EXEC_BRANCH,
|
||||
EXEC_CHECKPOINT,
|
||||
@@ -16,6 +16,7 @@ from ..refs import (
|
||||
EXEC_MERGE,
|
||||
EXEC_NAMESPACE,
|
||||
)
|
||||
|
||||
from .base import BaseExecutor, ExecutorInfo, ExecutorResult, TaskStatus
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -126,7 +127,7 @@ class SSHExecutor(BaseExecutor):
|
||||
infofile: Optional[str],
|
||||
branch: Optional[str] = None,
|
||||
):
|
||||
from ..utils import push_refspec
|
||||
from dvc.repo.experiments.utils import push_refspec
|
||||
|
||||
self.status = TaskStatus.PREPARING
|
||||
if infofile:
|
||||
|
||||
@@ -82,7 +82,7 @@ def _push(
|
||||
) -> Mapping[SyncStatus, List["ExpRefInfo"]]:
|
||||
from scmrepo.exceptions import AuthError
|
||||
|
||||
from ...scm import GitAuthError
|
||||
from dvc.scm import GitAuthError
|
||||
|
||||
refspec_list = [f"{exp_ref}:{exp_ref}" for exp_ref in refs]
|
||||
logger.debug("git push experiment '%s' -> '%s'", refspec_list, git_remote)
|
||||
|
||||
@@ -23,20 +23,23 @@ from dvc.dependency import ParamsDependency
|
||||
from dvc.env import DVC_EXP_BASELINE_REV, DVC_EXP_NAME, DVCLIVE_RESUME
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.lock import LockError
|
||||
from dvc.ui import ui
|
||||
|
||||
from ..exceptions import CheckpointExistsError, ExperimentExistsError
|
||||
from ..executor.base import BaseExecutor, ExecutorResult
|
||||
from ..executor.local import WorkspaceExecutor
|
||||
from ..refs import ExpRefInfo
|
||||
from ..stash import ExpStash, ExpStashEntry
|
||||
from ..utils import (
|
||||
from dvc.repo.experiments.exceptions import (
|
||||
CheckpointExistsError,
|
||||
ExperimentExistsError,
|
||||
)
|
||||
from dvc.repo.experiments.executor.base import BaseExecutor, ExecutorResult
|
||||
from dvc.repo.experiments.executor.local import WorkspaceExecutor
|
||||
from dvc.repo.experiments.refs import ExpRefInfo
|
||||
from dvc.repo.experiments.stash import ExpStash, ExpStashEntry
|
||||
from dvc.repo.experiments.utils import (
|
||||
EXEC_PID_DIR,
|
||||
EXEC_TMP_DIR,
|
||||
exp_refs_by_rev,
|
||||
get_exp_rwlock,
|
||||
get_random_exp_name,
|
||||
)
|
||||
from dvc.ui import ui
|
||||
|
||||
from .utils import get_remote_executor_refs
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -21,12 +21,12 @@ from kombu.message import Message
|
||||
|
||||
from dvc.daemon import daemonize
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.repo.experiments.exceptions import UnresolvedQueueExpNamesError
|
||||
from dvc.repo.experiments.executor.base import ExecutorInfo, ExecutorResult
|
||||
from dvc.repo.experiments.refs import CELERY_STASH
|
||||
from dvc.repo.experiments.utils import EXEC_TMP_DIR, get_exp_rwlock
|
||||
from dvc.ui import ui
|
||||
|
||||
from ..exceptions import UnresolvedQueueExpNamesError
|
||||
from ..executor.base import ExecutorInfo, ExecutorResult
|
||||
from ..refs import CELERY_STASH
|
||||
from ..utils import EXEC_TMP_DIR, get_exp_rwlock
|
||||
from .base import (
|
||||
BaseStashQueue,
|
||||
ExpRefAndQueueEntry,
|
||||
@@ -39,12 +39,11 @@ from .tasks import run_exp
|
||||
from .utils import fetch_running_exp_from_temp_dir
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from dvc.repo.experiments.refs import ExpRefInfo
|
||||
from dvc_task.app import FSApp
|
||||
from dvc_task.proc.manager import ProcessManager
|
||||
from dvc_task.worker import TemporaryWorker
|
||||
|
||||
from ..refs import ExpRefInfo
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -468,7 +467,7 @@ class LocalCeleryQueue(BaseStashQueue):
|
||||
git_remote: Optional[str] = None,
|
||||
) -> Dict[str, ExpRefAndQueueEntry]:
|
||||
"""Find finished ExpRefInfo or queued or failed QueueEntry by name"""
|
||||
from ..utils import resolve_name
|
||||
from dvc.repo.experiments.utils import resolve_name
|
||||
|
||||
if isinstance(exp_names, str):
|
||||
exp_names = [exp_names]
|
||||
|
||||
@@ -3,12 +3,13 @@ from typing import TYPE_CHECKING, Any, Dict
|
||||
from celery import shared_task
|
||||
from celery.utils.log import get_task_logger
|
||||
|
||||
from ..executor.base import ExecutorInfo
|
||||
from ..executor.local import TempDirExecutor
|
||||
from dvc.repo.experiments.executor.base import ExecutorInfo
|
||||
from dvc.repo.experiments.executor.local import TempDirExecutor
|
||||
|
||||
from .base import BaseStashQueue, QueueEntry
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..executor.base import BaseExecutor
|
||||
from dvc.repo.experiments.executor.base import BaseExecutor
|
||||
|
||||
|
||||
logger = get_task_logger(__name__)
|
||||
|
||||
@@ -6,16 +6,16 @@ from typing import TYPE_CHECKING, Dict, Generator, Optional
|
||||
from funcy import cached_property, first
|
||||
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
from ..exceptions import ExpQueueEmptyError
|
||||
from ..executor.base import (
|
||||
from dvc.repo.experiments.exceptions import ExpQueueEmptyError
|
||||
from dvc.repo.experiments.executor.base import (
|
||||
BaseExecutor,
|
||||
ExecutorInfo,
|
||||
ExecutorResult,
|
||||
TaskStatus,
|
||||
)
|
||||
from ..executor.local import TempDirExecutor
|
||||
from ..utils import EXEC_PID_DIR, EXEC_TMP_DIR
|
||||
from dvc.repo.experiments.executor.local import TempDirExecutor
|
||||
from dvc.repo.experiments.utils import EXEC_PID_DIR, EXEC_TMP_DIR
|
||||
|
||||
from .base import BaseStashQueue, QueueEntry, QueueGetResult
|
||||
from .utils import fetch_running_exp_from_temp_dir
|
||||
from .workspace import WorkspaceQueue
|
||||
|
||||
@@ -3,9 +3,14 @@ from typing import TYPE_CHECKING, Dict, List
|
||||
|
||||
from scmrepo.exceptions import SCMError
|
||||
|
||||
from ..executor.base import ExecutorInfo, TaskStatus
|
||||
from ..refs import EXEC_CHECKPOINT, EXEC_NAMESPACE, EXPS_NAMESPACE, EXPS_STASH
|
||||
from ..utils import get_exp_rwlock, iter_remote_refs
|
||||
from dvc.repo.experiments.executor.base import ExecutorInfo, TaskStatus
|
||||
from dvc.repo.experiments.refs import (
|
||||
EXEC_CHECKPOINT,
|
||||
EXEC_NAMESPACE,
|
||||
EXPS_NAMESPACE,
|
||||
EXPS_STASH,
|
||||
)
|
||||
from dvc.repo.experiments.utils import get_exp_rwlock, iter_remote_refs
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -48,11 +53,10 @@ def fetch_running_exp_from_temp_dir(
|
||||
Returns:
|
||||
Dict[str, Dict]: _description_
|
||||
"""
|
||||
from dvc.repo.experiments.executor.local import TempDirExecutor
|
||||
from dvc.scm import InvalidRemoteSCMRepo
|
||||
from dvc.utils.serialize import load_json
|
||||
|
||||
from ..executor.local import TempDirExecutor
|
||||
|
||||
result: Dict[str, Dict] = {}
|
||||
infofile = queue.get_infofile_path(rev)
|
||||
try:
|
||||
|
||||
@@ -9,20 +9,20 @@ from voluptuous import Invalid
|
||||
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.lock import make_lock
|
||||
from dvc.rwlock import RWLOCK_FILE, RWLOCK_LOCK, SCHEMA
|
||||
from dvc.utils import relpath
|
||||
from dvc.utils.fs import remove
|
||||
|
||||
from ..exceptions import ExpQueueEmptyError
|
||||
from ..executor.base import (
|
||||
from dvc.repo.experiments.exceptions import ExpQueueEmptyError
|
||||
from dvc.repo.experiments.executor.base import (
|
||||
BaseExecutor,
|
||||
ExecutorInfo,
|
||||
ExecutorResult,
|
||||
TaskStatus,
|
||||
)
|
||||
from ..executor.local import WorkspaceExecutor
|
||||
from ..refs import EXEC_BRANCH, WORKSPACE_STASH
|
||||
from ..utils import get_exp_rwlock, to_studio_params
|
||||
from dvc.repo.experiments.executor.local import WorkspaceExecutor
|
||||
from dvc.repo.experiments.refs import EXEC_BRANCH, WORKSPACE_STASH
|
||||
from dvc.repo.experiments.utils import get_exp_rwlock, to_studio_params
|
||||
from dvc.rwlock import RWLOCK_FILE, RWLOCK_LOCK, SCHEMA
|
||||
from dvc.utils import relpath
|
||||
from dvc.utils.fs import remove
|
||||
|
||||
from .base import BaseStashQueue, QueueDoneResult, QueueEntry, QueueGetResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -138,7 +138,7 @@ def push_refspec(
|
||||
from scmrepo.exceptions import AuthError
|
||||
from scmrepo.git.backend.base import SyncStatus
|
||||
|
||||
from ...scm import GitAuthError, SCMError
|
||||
from dvc.scm import GitAuthError, SCMError
|
||||
|
||||
refspecs = []
|
||||
for src, dest in push_list:
|
||||
|
||||
+1
-1
@@ -1,10 +1,10 @@
|
||||
import os
|
||||
|
||||
from dvc.exceptions import InvalidArgumentError, OutputDuplicationError
|
||||
from dvc.repo.scm_context import scm_context
|
||||
from dvc.utils import relpath, resolve_output, resolve_paths
|
||||
from dvc.utils.fs import path_isin
|
||||
|
||||
from ..exceptions import InvalidArgumentError, OutputDuplicationError
|
||||
from . import locked
|
||||
|
||||
|
||||
|
||||
+1
-2
@@ -33,10 +33,9 @@ def move(self, from_path, to_path):
|
||||
also known as data sources.
|
||||
"""
|
||||
import dvc.output as Output
|
||||
from dvc.dvcfile import DVC_FILE_SUFFIX, Dvcfile
|
||||
from dvc.stage import Stage
|
||||
|
||||
from ..dvcfile import DVC_FILE_SUFFIX, Dvcfile
|
||||
|
||||
from_out = Output.loads_from(Stage(self), [from_path])[0]
|
||||
assert from_out.protocol == "local"
|
||||
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
from typing import TYPE_CHECKING, Optional, Sequence
|
||||
|
||||
from dvc.exceptions import InvalidArgumentError, UploadError
|
||||
from dvc.utils import glob_targets
|
||||
|
||||
from ..utils import glob_targets
|
||||
from . import locked
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -53,7 +53,7 @@ def _reproduce_stage(stage: "Stage", **kwargs):
|
||||
|
||||
|
||||
def _dump_stage(stage):
|
||||
from ..dvcfile import Dvcfile
|
||||
from dvc.dvcfile import Dvcfile
|
||||
|
||||
dvcfile = Dvcfile(stage.repo, stage.path)
|
||||
dvcfile.dump(stage, update_pipeline=False)
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@ def update(
|
||||
remote=None,
|
||||
jobs=None,
|
||||
):
|
||||
from ..dvcfile import Dvcfile
|
||||
from dvc.dvcfile import Dvcfile
|
||||
|
||||
from .worktree import update_worktree_stages
|
||||
|
||||
if not targets:
|
||||
|
||||
@@ -108,7 +108,7 @@ def restore_fields(stage):
|
||||
return
|
||||
|
||||
# will be used to restore comments later
|
||||
# noqa, pylint: disable=protected-access
|
||||
# pylint: disable=protected-access
|
||||
stage._stage_text = old._stage_text
|
||||
stage.meta = old.meta
|
||||
stage.desc = old.desc
|
||||
|
||||
+1
-1
@@ -192,7 +192,7 @@ class SingleStageLoader(Mapping):
|
||||
dvcfile.repo.fs, dvcfile.path, d.get(Stage.PARAM_WDIR)
|
||||
)
|
||||
stage = loads_from(Stage, dvcfile.repo, path, wdir, d)
|
||||
stage._stage_text = stage_text # noqa, pylint:disable=protected-access
|
||||
stage._stage_text = stage_text # pylint: disable=protected-access
|
||||
stage.deps = dependency.loadd_from(
|
||||
stage, d.get(Stage.PARAM_DEPS) or []
|
||||
)
|
||||
|
||||
@@ -200,7 +200,7 @@ def to_single_stage_file(stage: "Stage", **kwargs):
|
||||
# - reparse the same yaml text with a slow but smart ruamel yaml parser
|
||||
# - apply changes to a returned structure
|
||||
# - serialize it
|
||||
text = stage._stage_text # noqa, pylint: disable=protected-access
|
||||
text = stage._stage_text # pylint: disable=protected-access
|
||||
if text is None:
|
||||
return state
|
||||
|
||||
|
||||
+3
-4
@@ -149,8 +149,7 @@ def check_missing_outputs(stage):
|
||||
|
||||
def compute_md5(stage):
|
||||
from dvc.output import Output
|
||||
|
||||
from ..utils import dict_md5
|
||||
from dvc.utils import dict_md5
|
||||
|
||||
d = stage.dumpd()
|
||||
|
||||
@@ -183,7 +182,7 @@ def compute_md5(stage):
|
||||
|
||||
|
||||
def resolve_wdir(wdir, path):
|
||||
from ..utils import relpath
|
||||
from dvc.utils import relpath
|
||||
|
||||
rel_wdir = relpath(wdir, os.path.dirname(path))
|
||||
return pathlib.PurePath(rel_wdir).as_posix() if rel_wdir != "." else None
|
||||
@@ -215,7 +214,7 @@ def get_dump(stage, **kwargs):
|
||||
|
||||
|
||||
def split_params_deps(stage):
|
||||
from ..dependency import ParamsDependency
|
||||
from dvc.dependency import ParamsDependency
|
||||
|
||||
return lsplit(rpartial(isinstance, ParamsDependency), stage.deps)
|
||||
|
||||
|
||||
@@ -278,10 +278,10 @@ def resolve_output(inp, out):
|
||||
def resolve_paths(repo, out, always_local=False):
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from dvc.dvcfile import DVC_FILE_SUFFIX
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.fs import localfs
|
||||
|
||||
from ..dvcfile import DVC_FILE_SUFFIX
|
||||
from ..exceptions import DvcException
|
||||
from .fs import contains_symlink_up_to
|
||||
|
||||
abspath = os.path.abspath(out)
|
||||
@@ -379,7 +379,7 @@ def parse_target(
|
||||
|
||||
|
||||
def glob_targets(targets, glob=True, recursive=True):
|
||||
from ..exceptions import DvcException
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
if not glob:
|
||||
return targets
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
try:
|
||||
# file is created during dvc build
|
||||
from .build import PKG # noqa, pylint:disable=unused-import
|
||||
from .build import PKG # pylint:disable=unused-import
|
||||
except ImportError:
|
||||
PKG = None # type: ignore[assignment]
|
||||
|
||||
+6
-4
@@ -159,13 +159,15 @@ profile = "black"
|
||||
known_first_party = ["dvc", "dvc_data", "dvc_objects", "dvc_render", "dvc_task", "tests"]
|
||||
line_length = 79
|
||||
|
||||
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 79
|
||||
ignore = ["S101", "RUF100", "SIM105", "SIM108", "SIM110", "SIM111", "SIM117", "A003", "ARG002"]
|
||||
select = ["F", "E", "W", "C90", "UP", "YTT", "S", "BLE", "B", "A", "C4", "T10", "ISC", "ICN", "T20", "PT003", "PT008", "PT009", "PT010", "PT015", "PT016", "PT017", "PT020", "PT021", "PT024", "PT025", "PT026", "Q", "RET501", "RET504", "SIM", "ARG", "PGH", "PLC", "PLE", "PLR", "PLW", "PIE", "RUF"]
|
||||
target-version = "py38"
|
||||
format = "grouped"
|
||||
show-source = true
|
||||
ignore = ["S101", "SIM105", "SIM108", "SIM110", "SIM111", "SIM117", "A003", "ARG002"]
|
||||
select = ["F", "E", "W", "C90", "UP", "YTT", "S", "BLE", "B", "A", "C4", "T10", "ISC", "ICN", "T20", "PT003", "PT008", "PT009", "PT010", "PT015", "PT016", "PT017", "PT020", "PT021", "PT024", "PT025", "PT026", "Q", "RET501", "RET504", "SIM", "ARG", "TID", "PGH", "PLC", "PLE", "PLR", "PLW", "PIE", "RUF"]
|
||||
# external flake8 codes that should be preserved
|
||||
external = ["B301", "B024", "C901", "E302", "C901", "F401", "W601"]
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
"scripts/**/*.py" = ["T201"]
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from dvc.exceptions import InvalidArgumentError
|
||||
|
||||
from ..utils.test_hydra import hydra_setup
|
||||
from tests.func.utils.test_hydra import hydra_setup
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
+1
-2
@@ -1,3 +1,2 @@
|
||||
extend = "../pyproject.toml"
|
||||
# keep in sync with `../pyproject.toml`
|
||||
ignore = ["S", "RUF001", "RUF100", "SIM105", "SIM108", "SIM110", "SIM111", "SIM117", "A003", "ARG001", "ARG002"]
|
||||
extend-ignore = ["S", "RUF001", "ARG001", "ARG002"]
|
||||
|
||||
Reference in New Issue
Block a user