bump ruff to 0.0.238 (#8915)

This commit is contained in:
skshetry
2023-01-31 11:24:03 +05:45
committed by GitHub
parent 73aea2d972
commit 8208846003
9 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.236'
rev: 'v0.0.238'
hooks:
- id: ruff
- repo: https://github.com/codespell-project/codespell
+1 -1
View File
@@ -139,7 +139,7 @@ class RepoDependency(Dependency):
self._check_circular_import(odb, obj_ids)
used_obj_ids[odb].update(obj_ids)
except (NoRemoteError, NoOutputOrStageError):
pass
pass # noqa: S110
try:
object_store, meta, obj = build(
+1 -1
View File
@@ -304,7 +304,7 @@ class _DVCFileSystem(AbstractFileSystem): # pylint:disable=abstract-method
):
fs_infos[fs.path.name(info["name"])] = info
except (FileNotFoundError, NotADirectoryError):
pass
pass # noqa: S110
dvcfiles = kwargs.get("dvcfiles", False)
+1 -1
View File
@@ -156,7 +156,7 @@ class LoggerHandler(logging.StreamHandler):
if not _is_verbose():
return
except Exception: # noqa, pylint: disable=broad-except
pass
pass # noqa: S110
msg = self.format(record)
Tqdm.write(
+1 -1
View File
@@ -426,7 +426,7 @@ class Experiments:
try:
name = ExpRefInfo.from_ref(ref).name
except InvalidExpRefError:
pass
pass # noqa: S110
if not name:
if rev in self.stash_revs:
name = self.stash_revs[rev].name
+1 -1
View File
@@ -148,7 +148,7 @@ def show(
except (SCMError, NoSCMError):
# SCMError - detached head
# NoSCMError - no repo case
pass
pass # noqa: S110
else:
if res.get("workspace") == res.get(active_branch):
res.pop("workspace", None)
+1 -1
View File
@@ -171,7 +171,7 @@ def show(
except (SCMError, NoSCMError):
# SCMError - detached head
# NoSCMError - no repo case
pass
pass # noqa: S110
else:
if res.get("workspace") == res.get(active_branch):
res.pop("workspace", None)
+5 -5
View File
@@ -161,15 +161,11 @@ line_length = 79
line-length = 79
target-version = "py38"
show-source = true
ignore = ["S101", "PT004", "PT007", "PT019", "SIM105", "SIM108", "SIM110", "SIM111", "SIM117", "TRY003", "TRY200", "TRY300", "TRY301", "PLR2004", "RUF005"]
ignore = ["S101", "PT004", "PT007", "PT019", "SIM105", "SIM108", "SIM110", "SIM111", "SIM117", "TRY003", "TRY200", "TRY300", "TRY301", "PLR0913", "PLR2004", "RUF005"]
select = ["F", "E", "W", "C90", "UP", "YTT", "S", "BLE", "B", "A", "C4", "T10", "ISC", "ICN", "G", "INP", "PIE", "T20", "PT", "Q", "RET501", "RET504", "SIM", "TID", "TCH", "ARG", "PGH", "PLC", "PLE", "PLR", "PLW", "TRY", "RUF"]
# external flake8 codes that should be preserved
external = ["B301", "B024", "C901", "E302", "F401", "W601"]
[tool.ruff.per-file-ignores]
"dvc/testing/*.py" = ["ARG002"]
"scripts/**/*.py" = ["T201", "INP001", "TRY002"]
[tool.ruff.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
@@ -187,6 +183,10 @@ strict = true
[tool.ruff.flake8-unused-arguments]
ignore-variadic-names = true
[tool.ruff.per-file-ignores]
"dvc/testing/*.py" = ["ARG002"]
"scripts/**/*.py" = ["T201", "INP001", "TRY002"]
[tool.pytest.ini_options]
log_level = "debug"
addopts = "-ra --cov-config pyproject.toml"
+2 -2
View File
@@ -31,11 +31,11 @@ def test_init_args(tmp_dir, args, mocker):
def test_run(tmp_dir, mocker):
proc = ManagedProcess("/bin/foo")
assert TEST_PID == proc.pid
assert proc.pid == TEST_PID
with open(proc.info_path, encoding="utf-8") as fobj:
info = ProcessInfo.from_dict(json.load(fobj))
assert TEST_PID == info.pid
assert info.pid == TEST_PID
def test_wait(tmp_dir, mocker):