mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
nit: fit statement/expr in the same line instead of hanging (#10267)
The code are wrapped due to us using line-length=79 before, but now some of the code can easily fit in 88 chars. The formatter did not change this automatically when we changed line-length, because of magic trailing commas that gets added when they turn into multiple lines. Black/ruff wrapping them in parens and splitting them into multiple lines was making it difficult to read.
This commit is contained in:
@@ -754,10 +754,7 @@ def test_add_file_in_symlink_dir(make_tmp_dir, tmp_dir, dvc):
|
||||
def test_add_with_cache_link_error(tmp_dir, dvc, mocker, capsys):
|
||||
tmp_dir.gen("foo", "foo")
|
||||
|
||||
mocker.patch(
|
||||
"dvc_data.hashfile.checkout.test_links",
|
||||
return_value=[],
|
||||
)
|
||||
mocker.patch("dvc_data.hashfile.checkout.test_links", return_value=[])
|
||||
dvc.add("foo")
|
||||
err = capsys.readouterr()[1]
|
||||
assert "reconfigure cache types" in err
|
||||
@@ -981,10 +978,7 @@ def test_add_does_not_remove_stage_file_on_failure(tmp_dir, dvc, mocker, target)
|
||||
dvcfile_contents = (tmp_dir / stage.path).read_text()
|
||||
|
||||
exc_msg = f"raising error from mocked '{target}'"
|
||||
mocker.patch(
|
||||
target,
|
||||
side_effect=DvcException(exc_msg),
|
||||
)
|
||||
mocker.patch(target, side_effect=DvcException(exc_msg))
|
||||
|
||||
with pytest.raises(DvcException, match=exc_msg):
|
||||
dvc.add("foo")
|
||||
|
||||
Reference in New Issue
Block a user