diff --git a/dvc/__pyinstaller/hook-dvc.py b/dvc/__pyinstaller/hook-dvc.py index 225f1106d..bd04e3c17 100644 --- a/dvc/__pyinstaller/hook-dvc.py +++ b/dvc/__pyinstaller/hook-dvc.py @@ -1,5 +1,5 @@ # ruff: noqa: N999 -from PyInstaller.utils.hooks import copy_metadata # pylint:disable=import-error +from PyInstaller.utils.hooks import copy_metadata # needed for `dvc doctor` to show dep versions datas = copy_metadata("adlfs", recursive=True) diff --git a/dvc/__pyinstaller/hook-dvc.utils.flatten.py b/dvc/__pyinstaller/hook-dvc.utils.flatten.py index 8d5cea5a1..2f08667b2 100644 --- a/dvc/__pyinstaller/hook-dvc.utils.flatten.py +++ b/dvc/__pyinstaller/hook-dvc.utils.flatten.py @@ -1,4 +1,4 @@ # ruff: noqa: N999 -from PyInstaller.utils.hooks import copy_metadata # pylint:disable=import-error +from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata("flatten-dict") diff --git a/dvc/__pyinstaller/hook-pydrive2.py b/dvc/__pyinstaller/hook-pydrive2.py index 55f5d5fcc..c3f65fb5c 100644 --- a/dvc/__pyinstaller/hook-pydrive2.py +++ b/dvc/__pyinstaller/hook-pydrive2.py @@ -1,4 +1,4 @@ # ruff: noqa: N999 -from PyInstaller.utils.hooks import copy_metadata # pylint:disable=import-error +from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata("pydrive2") diff --git a/dvc/_debug.py b/dvc/_debug.py index 072e03794..885ae04df 100644 --- a/dvc/_debug.py +++ b/dvc/_debug.py @@ -65,9 +65,9 @@ def yappi_profile( else: if ctx_id is not None: print(f"\nThread {ctx_id}") # noqa: T201 - st.print_all() # pylint:disable=no-member + st.print_all() if ctx_id is None: - threads.print_all() # pylint:disable=no-member + threads.print_all() yappi.clear_stats() @@ -117,7 +117,7 @@ def debug(): yield except Exception: try: - import ipdb as pdb # noqa: T100, pylint: disable=import-error + import ipdb as pdb # noqa: T100 except ImportError: import pdb # type: ignore[no-redef] # noqa: T100 pdb.post_mortem() diff --git a/dvc/api/data.py b/dvc/api/data.py index de638fb50..e40f9bbc8 100644 --- a/dvc/api/data.py +++ b/dvc/api/data.py @@ -67,7 +67,7 @@ class _OpenContextManager(GCM): raise AttributeError("dvc.api.open() should be used in a with statement.") -def open( # noqa: A001, pylint: disable=redefined-builtin +def open( # noqa: A001 path: str, repo: Optional[str] = None, rev: Optional[str] = None, diff --git a/dvc/build.py b/dvc/build.py index 421954b0b..7800ee136 100644 --- a/dvc/build.py +++ b/dvc/build.py @@ -2,7 +2,6 @@ from typing import Optional try: # file is created during dvc build - # pylint:disable=unused-import from . import _build # type: ignore[attr-defined, import] PKG: Optional[str] = _build.PKG # type: ignore[assignment] diff --git a/dvc/cli/__init__.py b/dvc/cli/__init__.py index a296ecc37..070cafcb6 100644 --- a/dvc/cli/__init__.py +++ b/dvc/cli/__init__.py @@ -229,7 +229,7 @@ def main(argv=None): # noqa: C901, PLR0912, PLR0915 logger.exception("") except DvcParserError: ret = 254 - except Exception as exc: # noqa: BLE001, pylint: disable=broad-except + except Exception as exc: # noqa: BLE001 ret = _log_exceptions(exc) or 255 try: diff --git a/dvc/daemon.py b/dvc/daemon.py index f7f9faf48..e3b598afe 100644 --- a/dvc/daemon.py +++ b/dvc/daemon.py @@ -71,7 +71,6 @@ def _fork_process() -> int: # with PyInstaller has trouble with SystemExit exception and throws # errors such as "[26338] Failed to execute script __main__" try: - # pylint: disable-next=no-member pid = os.fork() # type: ignore[attr-defined] if pid > 0: return pid @@ -82,7 +81,6 @@ def _fork_process() -> int: os.setsid() # type: ignore[attr-defined] try: - # pylint: disable-next=no-member pid = os.fork() # type: ignore[attr-defined] if pid > 0: os._exit(0) diff --git a/dvc/dvcfile.py b/dvc/dvcfile.py index b514945e6..b6d5e22b1 100644 --- a/dvc/dvcfile.py +++ b/dvc/dvcfile.py @@ -166,7 +166,6 @@ class FileMixin: **kwargs, ) - # pylint: disable-next=unused-argument def remove(self, force=False): # noqa: ARG002 with contextlib.suppress(FileNotFoundError): os.unlink(self.path) @@ -208,7 +207,6 @@ class SingleStageFile(FileMixin): dump_yaml(self.path, serialize.to_single_stage_file(stage, **kwargs)) self.repo.scm_context.track_file(self.relpath) - # pylint: disable-next=unused-argument def remove_stage(self, stage): # noqa: ARG002 self.remove() diff --git a/dvc/exceptions.py b/dvc/exceptions.py index dbdefa3e5..cc74310eb 100644 --- a/dvc/exceptions.py +++ b/dvc/exceptions.py @@ -301,7 +301,7 @@ class URLMissingError(DvcException): super().__init__(f"The path '{url}' does not exist") -class IsADirectoryError(DvcException): # noqa: A001,pylint:disable=redefined-builtin +class IsADirectoryError(DvcException): # noqa: A001 """Raised when a file operation is requested on a directory.""" diff --git a/dvc/fs/__init__.py b/dvc/fs/__init__.py index bbe169eff..77ac37cab 100644 --- a/dvc/fs/__init__.py +++ b/dvc/fs/__init__.py @@ -44,9 +44,6 @@ known_implementations.update( ) -# pylint: enable=unused-import - - def download( fs: "FileSystem", fs_path: str, to: str, jobs: Optional[int] = None ) -> int: @@ -164,8 +161,8 @@ def get_cloud_fs(repo_config, **kwargs): # should be treated as being a root path. fs_path = cls.root_marker else: - fs_path = cls._strip_protocol(url) # pylint:disable=protected-access + fs_path = cls._strip_protocol(url) - extras = cls._get_kwargs_from_urls(url) # pylint:disable=protected-access + extras = cls._get_kwargs_from_urls(url) conf = {**extras, **remote_conf} # remote config takes priority return cls, conf, fs_path diff --git a/dvc/fs/callbacks.py b/dvc/fs/callbacks.py index dd4ce3f38..ae977ad00 100644 --- a/dvc/fs/callbacks.py +++ b/dvc/fs/callbacks.py @@ -71,7 +71,7 @@ class RichCallback(Callback): value: int = 0, progress: Optional["RichTransferProgress"] = None, desc: Optional[str] = None, - bytes: bool = False, # noqa: A002, pylint: disable=redefined-builtin + bytes: bool = False, # noqa: A002 unit: Optional[str] = None, disable: bool = False, transient: bool = True, diff --git a/dvc/fs/git.py b/dvc/fs/git.py index c1da16745..2317f3cd4 100644 --- a/dvc/fs/git.py +++ b/dvc/fs/git.py @@ -10,7 +10,7 @@ if TYPE_CHECKING: from dvc.scm import Git -class GitFileSystem(FileSystem): # pylint:disable=abstract-method +class GitFileSystem(FileSystem): """Proxies the repo file access methods to Git objects""" protocol = "local" diff --git a/dvc/logger.py b/dvc/logger.py index 15cf80abc..e0d7d1174 100644 --- a/dvc/logger.py +++ b/dvc/logger.py @@ -149,7 +149,6 @@ class LoggerHandler(logging.StreamHandler): self.emit_pretty_exception(exc, verbose=_is_verbose()) if not _is_verbose(): return - # pylint: disable-next=broad-except except Exception: # noqa: BLE001, S110 pass @@ -158,7 +157,7 @@ class LoggerHandler(logging.StreamHandler): self.flush() except (BrokenPipeError, RecursionError): raise - except Exception: # noqa: BLE001, pylint: disable=broad-except + except Exception: # noqa: BLE001 self.handleError(record) diff --git a/dvc/output.py b/dvc/output.py index 147a33770..eacc2fb6d 100644 --- a/dvc/output.py +++ b/dvc/output.py @@ -331,7 +331,7 @@ class Output: plot=False, persist=False, desc=None, - type=None, # noqa: A002, pylint: disable=redefined-builtin + type=None, # noqa: A002 labels=None, meta=None, remote=None, @@ -694,8 +694,6 @@ class Output: self.repo.scm_context.ignore_remove(self.fspath) - # pylint: enable=no-member - def save(self) -> None: if self.use_cache and not self.is_in_repo: raise DvcException( diff --git a/dvc/parsing/interpolate.py b/dvc/parsing/interpolate.py index 1d2a4d2d1..e5462775e 100644 --- a/dvc/parsing/interpolate.py +++ b/dvc/parsing/interpolate.py @@ -82,12 +82,12 @@ def escape_str(value): @singledispatch -def to_str(obj, config=None) -> str: # noqa: ARG001, pylint: disable=unused-argument +def to_str(obj, config=None) -> str: # noqa: ARG001 return str(obj) @to_str.register(bool) -def _(obj: bool, config=None): # noqa: ARG001, pylint: disable=unused-argument +def _(obj: bool, config=None): # noqa: ARG001 return "true" if obj else "false" diff --git a/dvc/progress.py b/dvc/progress.py index 9754cfbb7..0793d8367 100644 --- a/dvc/progress.py +++ b/dvc/progress.py @@ -48,7 +48,7 @@ class Tqdm(tqdm): desc=None, leave=False, bar_format=None, - bytes=False, # noqa: A002, pylint: disable=redefined-builtin + bytes=False, # noqa: A002 file=None, total=None, postfix=None, diff --git a/dvc/render/match.py b/dvc/render/match.py index a65386548..f7fb6e7a0 100644 --- a/dvc/render/match.py +++ b/dvc/render/match.py @@ -109,7 +109,7 @@ def match_defs_renderers( # noqa: C901, PLR0912 try: dps, rev_props = converter.flat_datapoints(rev) - except Exception as e: # noqa: BLE001, pylint: disable=broad-except + except Exception as e: # noqa: BLE001 logger.warning("In %r, %s", rev, str(e).lower()) def_errors[rev] = e continue diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index 4afb87e40..6c6a25547 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -386,9 +386,7 @@ class Repo: if self.subrepos: fs_path = self.dvcfs.from_os_path(path) fs = self.dvcfs.fs - # pylint: disable-next=protected-access key = fs._get_key_from_relative(fs_path) - # pylint: disable-next=protected-access subrepo, _, key = fs._get_subrepo_info(key) index = subrepo.index.data[workspace] else: diff --git a/dvc/repo/artifacts.py b/dvc/repo/artifacts.py index 30365d31d..34ee01f24 100644 --- a/dvc/repo/artifacts.py +++ b/dvc/repo/artifacts.py @@ -238,7 +238,7 @@ class Artifacts: from_infos.append(url) except DvcException: raise - except Exception as exc: # noqa: BLE001, pylint: disable=broad-except + except Exception as exc: # noqa: BLE001 raise DvcException( f"Failed to download artifact '{name}' via Studio" ) from exc @@ -298,7 +298,7 @@ class Artifacts: ) except FileExistsLocallyError: raise - except Exception as exc: # noqa: BLE001, pylint: disable=broad-except + except Exception as exc: # noqa: BLE001 saved_exc = exc if config and not isinstance(config, dict): @@ -326,7 +326,7 @@ class Artifacts: ) except FileExistsLocallyError: raise - except Exception as exc: # noqa: BLE001, pylint: disable=broad-except + except Exception as exc: # noqa: BLE001 saved_exc = exc try: @@ -340,7 +340,7 @@ class Artifacts: ) except FileExistsLocallyError: raise - except Exception as exc: # noqa: BLE001, pylint: disable=broad-except + except Exception as exc: # noqa: BLE001 if saved_exc: logger.exception(str(saved_exc), exc_info=saved_exc.__cause__) raise DvcException( diff --git a/dvc/repo/commit.py b/dvc/repo/commit.py index 4b3b1b6c5..a45539d8a 100644 --- a/dvc/repo/commit.py +++ b/dvc/repo/commit.py @@ -92,7 +92,6 @@ def commit_2_to_3(repo: "Repo", dry: bool = False): for out in view.outs: dvcfile = out.stage.dvcfile.relpath if isinstance(out.stage.dvcfile, ProjectFile): - # pylint: disable-next=protected-access lockfile = out.stage.dvcfile._lockfile.relpath migrated.add(f"{dvcfile} ({lockfile})") else: diff --git a/dvc/repo/diff.py b/dvc/repo/diff.py index 3666a0190..d29f96d93 100644 --- a/dvc/repo/diff.py +++ b/dvc/repo/diff.py @@ -135,7 +135,6 @@ def diff( continue def onerror(target, _exc): - # pylint: disable-next=cell-var-from-loop missing_targets[rev].add(target) # noqa: B023 view = self.index.targets_view( diff --git a/dvc/repo/experiments/collect.py b/dvc/repo/experiments/collect.py index c610a5d5e..55697b6d5 100644 --- a/dvc/repo/experiments/collect.py +++ b/dvc/repo/experiments/collect.py @@ -73,7 +73,7 @@ def collect_rev( if not (rev == "workspace" or param_deps or data.contains_error): cache.put(data, force=True) return ExpState(rev=rev, data=data) - except Exception as exc: # noqa: BLE001, pylint: disable=broad-except + except Exception as exc: # noqa: BLE001 logger.debug("", exc_info=True) error = SerializableError(str(exc), type(exc).__name__) return ExpState(rev=rev, error=error) diff --git a/dvc/repo/experiments/executor/base.py b/dvc/repo/experiments/executor/base.py index ca0ae8f44..c168ea0b5 100644 --- a/dvc/repo/experiments/executor/base.py +++ b/dvc/repo/experiments/executor/base.py @@ -687,7 +687,7 @@ class BaseExecutor(ABC): push_cache=push_cache, run_cache=run_cache, ) - except BaseException as exc: # noqa: BLE001, pylint: disable=W0703 + except BaseException as exc: # noqa: BLE001 logger.warning( ( "Something went wrong while auto pushing experiment " diff --git a/dvc/repo/experiments/push.py b/dvc/repo/experiments/push.py index 2d1cd9dcb..f62b1b263 100644 --- a/dvc/repo/experiments/push.py +++ b/dvc/repo/experiments/push.py @@ -133,7 +133,7 @@ def push( if push_cache: try: result["uploaded"] = _push_cache(repo, pushed_refs_info, **kwargs) - except Exception as exc: # noqa: BLE001, pylint: disable=broad-except + except Exception as exc: # noqa: BLE001 e = exc pushed_refs = [str(r) for r in pushed_refs_info] diff --git a/dvc/repo/experiments/queue/base.py b/dvc/repo/experiments/queue/base.py index 92d9e9b3c..993624662 100644 --- a/dvc/repo/experiments/queue/base.py +++ b/dvc/repo/experiments/queue/base.py @@ -441,7 +441,7 @@ class BaseStashQueue(ABC): with open(self.args_file, "rb") as fobj: try: data = pickle.load(fobj) # noqa: S301 - except Exception: # noqa: BLE001, pylint: disable=broad-except + except Exception: # noqa: BLE001 data = {} extra = int(data.get("extra", 0)) + 1 else: diff --git a/dvc/repo/experiments/queue/tasks.py b/dvc/repo/experiments/queue/tasks.py index d886619c3..566c6dbb7 100644 --- a/dvc/repo/experiments/queue/tasks.py +++ b/dvc/repo/experiments/queue/tasks.py @@ -44,7 +44,7 @@ def setup_exp(entry_dict: Dict[str, Any]) -> "BaseExecutor": @shared_task def collect_exp( - proc_dict: Dict[str, Any], # noqa: ARG001, pylint: disable=unused-argument + proc_dict: Dict[str, Any], # noqa: ARG001 entry_dict: Dict[str, Any], ) -> str: """Collect results for an experiment. diff --git a/dvc/repo/index.py b/dvc/repo/index.py index 3ee28ba33..1fe992e6c 100644 --- a/dvc/repo/index.py +++ b/dvc/repo/index.py @@ -304,7 +304,7 @@ class Index: def check_graph(self) -> None: if not getattr(self.repo, "_skip_graph_checks", False): - self.graph # noqa: B018, pylint: disable=pointless-statement + self.graph # noqa: B018 @property def params(self) -> Iterator["ParamsDependency"]: diff --git a/dvc/repo/metrics/show.py b/dvc/repo/metrics/show.py index 81edbfb0f..c43e4faa6 100644 --- a/dvc/repo/metrics/show.py +++ b/dvc/repo/metrics/show.py @@ -76,7 +76,7 @@ def _read_metrics( for metric in metrics: try: yield metric, _read_metric(fs, metric, **load_kwargs) - except Exception as exc: # noqa: BLE001 # pylint:disable=broad-exception-caught + except Exception as exc: # noqa: BLE001 logger.debug(exc) yield metric, exc @@ -219,7 +219,7 @@ def show( on_error=on_error, ) res[rev] = Result(data=result) - except Exception as exc: # noqa: BLE001 # pylint:disable=broad-exception-caught + except Exception as exc: # noqa: BLE001 if on_error == "raise": raise diff --git a/dvc/repo/params/show.py b/dvc/repo/params/show.py index 310bea883..0ce0f69fb 100644 --- a/dvc/repo/params/show.py +++ b/dvc/repo/params/show.py @@ -108,7 +108,7 @@ def _read_params( for file_path, key_paths in params.items(): try: yield file_path, read_param_file(fs, file_path, key_paths, **load_kwargs) - except Exception as exc: # noqa: BLE001 # pylint:disable=broad-exception-caught + except Exception as exc: # noqa: BLE001 logger.debug(exc) yield file_path, exc @@ -192,7 +192,7 @@ def show( on_error=on_error, ) res[rev] = Result(data=params) - except Exception as exc: # noqa: BLE001 # pylint:disable=broad-exception-caught + except Exception as exc: # noqa: BLE001 if on_error == "raise": raise logger.warning("failed to load params in revision %r, %s", rev, str(exc)) diff --git a/dvc/repo/reproduce.py b/dvc/repo/reproduce.py index 77470cfe8..e157d8a20 100644 --- a/dvc/repo/reproduce.py +++ b/dvc/repo/reproduce.py @@ -197,7 +197,7 @@ def _reproduce( try: ret = repro_fn(stage, upstream=upstream, force=force_stage, **kwargs) - except Exception as exc: # noqa: BLE001, pylint: disable=broad-exception-caught + except Exception as exc: # noqa: BLE001 failed.append(stage) if on_error == "fail": _raise_error(exc, stage) diff --git a/dvc/scm.py b/dvc/scm.py index 3bf43bead..323adaf59 100644 --- a/dvc/scm.py +++ b/dvc/scm.py @@ -14,7 +14,7 @@ from typing import ( ) from funcy import group_by -from scmrepo.base import Base # noqa: F401, pylint: disable=unused-import +from scmrepo.base import Base # noqa: F401 from scmrepo.git import Git from scmrepo.noscm import NoSCM diff --git a/dvc/stage/__init__.py b/dvc/stage/__init__.py index f67f883c3..7cec7da9c 100644 --- a/dvc/stage/__init__.py +++ b/dvc/stage/__init__.py @@ -138,9 +138,6 @@ def restore_fields(stage: "Stage") -> None: class Stage(params.StageParams): - # pylint:disable=no-value-for-parameter - # rwlocked() confuses pylint - def __init__( # noqa: PLR0913 self, repo, diff --git a/dvc/stage/loader.py b/dvc/stage/loader.py index 6b42d2ec0..75fa95def 100644 --- a/dvc/stage/loader.py +++ b/dvc/stage/loader.py @@ -73,14 +73,12 @@ class StageLoader(Mapping): hash_name = info.pop(Output.PARAM_HASH, None) item.meta = Meta.from_dict(merge_file_meta_from_cloud(info)) - # pylint: disable-next=protected-access item.hash_name, item.hash_info = item._compute_hash_info_from_meta( hash_name ) files = get_in(checksums, [key, path, item.PARAM_FILES], None) if files: item.files = [merge_file_meta_from_cloud(f) for f in files] - # pylint: disable-next=protected-access item._compute_meta_hash_info_from_files() @classmethod diff --git a/dvc/testing/conftest.py b/dvc/testing/conftest.py index 6e01dd914..2d6446097 100644 --- a/dvc/testing/conftest.py +++ b/dvc/testing/conftest.py @@ -1 +1 @@ -from .fixtures import * # noqa: F403, pylint: disable=wildcard-import +from .fixtures import * # noqa: F403 diff --git a/dvc/testing/path_info.py b/dvc/testing/path_info.py index 959dbf25e..48d5a0f0c 100644 --- a/dvc/testing/path_info.py +++ b/dvc/testing/path_info.py @@ -17,7 +17,6 @@ class _BasePath: return self.isin_or_eq(other) or other.isin(self) def isin_or_eq(self, other): - # pylint: disable-next=no-member return self == other or self.isin(other) # type: ignore[attr-defined] @@ -36,7 +35,6 @@ class PathInfo(pathlib.PurePath, _BasePath): return cls._from_parts(args) # type: ignore[attr-defined] def as_posix(self): - # pylint: disable-next=no-member f = self._flavour # type: ignore[attr-defined] # Unlike original implementation [1] that uses `str()` we actually need # to use `fspath`, because we've overridden `__str__` method to return diff --git a/dvc/testing/plugin.py b/dvc/testing/plugin.py index 54c9e468f..71c50ab30 100644 --- a/dvc/testing/plugin.py +++ b/dvc/testing/plugin.py @@ -1,5 +1,5 @@ -from .benchmarks.fixtures import * # noqa: F403, pylint: disable=wildcard-import -from .fixtures import * # noqa: F403, pylint: disable=wildcard-import +from .benchmarks.fixtures import * # noqa: F403 +from .fixtures import * # noqa: F403 def pytest_generate_tests(metafunc): diff --git a/dvc/utils/__init__.py b/dvc/utils/__init__.py index 878710ffd..c6998ded3 100644 --- a/dvc/utils/__init__.py +++ b/dvc/utils/__init__.py @@ -391,7 +391,7 @@ def error_handler(func): vals = func(*args, **kwargs) if vals: result["data"] = vals - except Exception as e: # noqa: BLE001, pylint: disable=broad-except + except Exception as e: # noqa: BLE001 if onerror is not None: onerror(result, e, **kwargs) return result diff --git a/dvc/utils/fs.py b/dvc/utils/fs.py index 381237286..96a3ad87f 100644 --- a/dvc/utils/fs.py +++ b/dvc/utils/fs.py @@ -38,7 +38,7 @@ def contains_symlink_up_to(path: "StrPath", base_path: "StrPath"): return contains_symlink_up_to(os.path.dirname(path), base_path) -def _chmod(func, p, excinfo): # noqa: ARG001, pylint: disable=unused-argument +def _chmod(func, p, excinfo): # noqa: ARG001 perm = os.lstat(p).st_mode perm |= stat.S_IWRITE diff --git a/dvc/utils/serialize/__init__.py b/dvc/utils/serialize/__init__.py index 437fd92ab..2433943da 100644 --- a/dvc/utils/serialize/__init__.py +++ b/dvc/utils/serialize/__init__.py @@ -1,11 +1,11 @@ from collections import defaultdict from typing import DefaultDict -from ._common import * # noqa: F403, pylint: disable=wildcard-import -from ._json import * # noqa: F403, pylint: disable=wildcard-import -from ._py import * # noqa: F403, pylint: disable=wildcard-import -from ._toml import * # noqa: F403, pylint: disable=wildcard-import -from ._yaml import * # noqa: F403, pylint: disable=wildcard-import +from ._common import * # noqa: F403 +from ._json import * # noqa: F403 +from ._py import * # noqa: F403 +from ._toml import * # noqa: F403 +from ._yaml import * # noqa: F403 LOADERS: DefaultDict[str, LoaderFn] = defaultdict( # noqa: F405 lambda: load_yaml # noqa: F405 diff --git a/pyproject.toml b/pyproject.toml index dbd209671..4a88de07d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -255,6 +255,7 @@ select = [ "FLY", "PERF101", "RUF", ] show-source = true +show-fixes = true [tool.ruff.flake8-pytest-style] fixture-parentheses = false diff --git a/tests/conftest.py b/tests/conftest.py index 1422860cd..ab07015d3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,11 +7,11 @@ import pytest from dvc import env from dvc.stage import PipelineStage -from dvc.testing.fixtures import * # noqa: F403, pylint: disable=wildcard-import +from dvc.testing.fixtures import * # noqa: F403 -from .dir_helpers import * # noqa: F403 # pylint: disable=wildcard-import -from .remotes import * # noqa: F403 # pylint: disable=wildcard-import -from .scripts import * # noqa: F403, pylint: disable=wildcard-import +from .dir_helpers import * # noqa: F403 +from .remotes import * # noqa: F403 +from .scripts import * # noqa: F403 # Prevent updater and analytics from running their processes os.environ["DVC_TEST"] = "true" diff --git a/tests/func/api/test_data.py b/tests/func/api/test_data.py index 348d7c598..947d5f48d 100644 --- a/tests/func/api/test_data.py +++ b/tests/func/api/test_data.py @@ -5,7 +5,7 @@ from funcy import first, get_in from dvc import api from dvc.exceptions import OutputNotFoundError, PathMissingError -from dvc.testing.api_tests import TestAPI # noqa: F401, pylint: disable=unused-import +from dvc.testing.api_tests import TestAPI # noqa: F401 from dvc.testing.tmp_dir import make_subrepo from dvc.utils.fs import remove diff --git a/tests/func/experiments/conftest.py b/tests/func/experiments/conftest.py index ab478326e..a974e1eb2 100644 --- a/tests/func/experiments/conftest.py +++ b/tests/func/experiments/conftest.py @@ -1,6 +1,5 @@ import pytest -# pylint: disable-next=unused-argument from tests.unit.repo.experiments.conftest import ( # noqa: F401 exp_stage, failed_exp_stage, diff --git a/tests/func/test_data_cloud.py b/tests/func/test_data_cloud.py index 6c745d602..190bc9ae3 100644 --- a/tests/func/test_data_cloud.py +++ b/tests/func/test_data_cloud.py @@ -10,7 +10,7 @@ from dvc.cli import main from dvc.exceptions import CheckoutError from dvc.repo.open_repo import clean_repos from dvc.stage.exceptions import StageNotFound -from dvc.testing.remote_tests import ( # noqa: F401, pylint: disable=unused-import +from dvc.testing.remote_tests import ( # noqa: F401 TestRemote, ) from dvc.utils.fs import remove diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 90a77b1c2..9b17a9791 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -1,2 +1 @@ -# pylint disable=unused-argument from tests.unit.repo.experiments.conftest import exp_stage, test_queue # noqa: F401 diff --git a/tests/remotes/__init__.py b/tests/remotes/__init__.py index c95987efd..a3d671732 100644 --- a/tests/remotes/__init__.py +++ b/tests/remotes/__init__.py @@ -1,4 +1,4 @@ -from dvc_ssh.tests.fixtures import ( # noqa: F401, pylint: disable=unused-import +from dvc_ssh.tests.fixtures import ( # noqa: F401 make_ssh, ssh, ssh_server,