Skip to content

Commit

Permalink
black: bump version 19.3b0 -> 19.10b0 (#3307)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr. Outis authored Feb 12, 2020
1 parent 9a78c0e commit 753aef4
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/ambv/black
rev: 19.3b0
rev: 19.10b0
hooks:
- id: black
language_version: python3
Expand Down
2 changes: 1 addition & 1 deletion .restyled.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
restylers:
- name: black
image: restyled/restyler-black:v19.3b0
image: restyled/restyler-black:v19.10b0
command:
- black
arguments: []
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def run(self):
]

if (sys.version_info) >= (3, 6):
tests_requirements.append("black==19.3b0")
tests_requirements.append("black==19.10b0")

setup(
name="dvc",
Expand Down
8 changes: 4 additions & 4 deletions tests/func/remote/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def test_dont_fail_on_unpacked_create_fail(tmp_dir, dvc):
stage, = tmp_dir.dvc_gen({"dir": {"file": "file_content"}})
(stage,) = tmp_dir.dvc_gen({"dir": {"file": "file_content"}})

with mock.patch.object(
RemoteLOCAL, "_create_unpacked_dir", side_effect=DvcException("msg")
Expand All @@ -18,7 +18,7 @@ def test_dont_fail_on_unpacked_create_fail(tmp_dir, dvc):


def test_remove_unpacked_on_create_fail(tmp_dir, dvc):
stage, = tmp_dir.dvc_gen({"dir": {"file": "file_content"}})
(stage,) = tmp_dir.dvc_gen({"dir": {"file": "file_content"}})
unpacked_dir = stage.outs[0].cache_path + RemoteLOCAL.UNPACKED_DIR_SUFFIX

# artificial unpacked dir for test purpose
Expand All @@ -34,7 +34,7 @@ def test_remove_unpacked_on_create_fail(tmp_dir, dvc):


def test_create_unpacked_on_status(tmp_dir, dvc):
stage, = tmp_dir.dvc_gen({"dir": {"file": "file_content"}})
(stage,) = tmp_dir.dvc_gen({"dir": {"file": "file_content"}})
unpacked_dir = stage.outs[0].cache_path + RemoteLOCAL.UNPACKED_DIR_SUFFIX
assert not os.path.exists(unpacked_dir)

Expand All @@ -45,7 +45,7 @@ def test_create_unpacked_on_status(tmp_dir, dvc):


def test_dir_cache_changed_on_single_cache_file_modification(tmp_dir, dvc):
stage, = tmp_dir.dvc_gen(
(stage,) = tmp_dir.dvc_gen(
{"dir": {"file1": "file1 content", "file2": "file2 content"}}
)
unpacked_dir = stage.outs[0].cache_path + RemoteLOCAL.UNPACKED_DIR_SUFFIX
Expand Down
10 changes: 5 additions & 5 deletions tests/func/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


def test_add(tmp_dir, dvc):
stage, = tmp_dir.dvc_gen({"foo": "foo"})
(stage,) = tmp_dir.dvc_gen({"foo": "foo"})
md5, _ = file_md5("foo")

assert stage is not None
Expand All @@ -49,7 +49,7 @@ def test_add_unicode(tmp_dir, dvc):
with open("\xe1", "wb") as fd:
fd.write("something".encode("utf-8"))

stage, = dvc.add("\xe1")
(stage,) = dvc.add("\xe1")

assert os.path.isfile(stage.path)

Expand All @@ -60,7 +60,7 @@ def test_add_unsupported_file(dvc):


def test_add_directory(tmp_dir, dvc):
stage, = tmp_dir.dvc_gen({"dir": {"file": "file"}})
(stage,) = tmp_dir.dvc_gen({"dir": {"file": "file"}})

assert stage is not None
assert len(stage.deps) == 0
Expand Down Expand Up @@ -161,7 +161,7 @@ def test_add_file_in_dir(tmp_dir, dvc):
tmp_dir.gen({"dir": {"subdir": {"subdata": "subdata content"}}})
subdir_path = os.path.join("dir", "subdir", "subdata")

stage, = dvc.add(subdir_path)
(stage,) = dvc.add(subdir_path)

assert stage is not None
assert len(stage.deps) == 0
Expand Down Expand Up @@ -549,7 +549,7 @@ def test_windows_should_add_when_cache_on_different_drive(
dvc.config.set("cache", "dir", temporary_windows_drive)
dvc.cache = Cache(dvc)

stage, = tmp_dir.dvc_gen({"file": "file"})
(stage,) = tmp_dir.dvc_gen({"file": "file"})
cache_path = stage.outs[0].cache_path

assert path_isin(cache_path, temporary_windows_drive)
Expand Down
6 changes: 3 additions & 3 deletions tests/func/test_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_commit_recursive(tmp_dir, dvc):

def test_commit_force(tmp_dir, dvc):
tmp_dir.gen({"dir": {"file": "text1", "file2": "text2"}})
stage, = dvc.add("dir", no_commit=True)
(stage,) = dvc.add("dir", no_commit=True)

with dvc.state:
assert stage.outs[0].changed_cache()
Expand All @@ -40,7 +40,7 @@ def test_commit_force(tmp_dir, dvc):

def test_commit_with_deps(tmp_dir, dvc, run_copy):
tmp_dir.gen("foo", "foo")
foo_stage, = dvc.add("foo", no_commit=True)
(foo_stage,) = dvc.add("foo", no_commit=True)
assert foo_stage is not None
assert len(foo_stage.outs) == 1

Expand All @@ -60,7 +60,7 @@ def test_commit_with_deps(tmp_dir, dvc, run_copy):

def test_commit_changed_md5(tmp_dir, dvc):
tmp_dir.gen({"file": "file content"})
stage, = dvc.add("file", no_commit=True)
(stage,) = dvc.add("file", no_commit=True)

stage_file_content = load_stage_file(stage.path)
stage_file_content["md5"] = "1111111111"
Expand Down
2 changes: 1 addition & 1 deletion tests/func/test_gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def test_all_commits(tmp_dir, scm, dvc):

def test_gc_no_dir_cache(tmp_dir, dvc):
tmp_dir.dvc_gen({"foo": "foo", "bar": "bar"})
dir_stage, = tmp_dir.dvc_gen({"dir": {"x": "x", "subdir": {"y": "y"}}})
(dir_stage,) = tmp_dir.dvc_gen({"dir": {"x": "x", "subdir": {"y": "y"}}})

os.unlink(dir_stage.outs[0].cache_path)

Expand Down
4 changes: 2 additions & 2 deletions tests/func/test_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def test_remote_dependency(self):


def test_md5_ignores_comments(tmp_dir, dvc):
stage, = tmp_dir.dvc_gen("foo", "foo content")
(stage,) = tmp_dir.dvc_gen("foo", "foo content")

with open(stage.path, "a") as f:
f.write("# End comment\n")
Expand All @@ -165,7 +165,7 @@ def test_md5_ignores_comments(tmp_dir, dvc):


def test_meta_is_preserved(tmp_dir, dvc):
stage, = tmp_dir.dvc_gen("foo", "foo content")
(stage,) = tmp_dir.dvc_gen("foo", "foo content")

# Add meta to DVC-file
data = load_stage_file(stage.path)
Expand Down
4 changes: 2 additions & 2 deletions tests/func/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_status_non_dvc_repo_import(tmp_dir, dvc, git_dir):
with git_dir.branch("branch", new=False):
git_dir.scm_gen("file", "second version", commit="update file")

status, = dvc.status(["file.dvc"])["file.dvc"]
(status,) = dvc.status(["file.dvc"])["file.dvc"]
assert status == {
"changed deps": {"file ({})".format(git_dir): "update available"}
}
Expand All @@ -60,7 +60,7 @@ def test_status_before_and_after_dvc_init(tmp_dir, dvc, git_dir):

assert old_rev != new_rev

status, = dvc.status(["file.dvc"])["file.dvc"]
(status,) = dvc.status(["file.dvc"])["file.dvc"]
assert status == {
"changed deps": {
"file ({})".format(fspath(git_dir)): "update available"
Expand Down
4 changes: 2 additions & 2 deletions tests/func/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def test_update_import_after_remote_updates_to_dvc(tmp_dir, dvc, erepo_dir):

assert old_rev != new_rev

status, = dvc.status([stage.path])["version.dvc"]
changed_dep, = list(status["changed deps"].items())
(status,) = dvc.status([stage.path])["version.dvc"]
(changed_dep,) = list(status["changed deps"].items())
assert changed_dep[0].startswith("version ")
assert changed_dep[1] == "update available"

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/repo/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_is_dvc_internal(dvc):
],
)
def test_find_outs_by_path(tmp_dir, dvc, path):
stage, = tmp_dir.dvc_gen(
(stage,) = tmp_dir.dvc_gen(
{"dir": {"subdir": {"file": "file"}, "other": "other"}}
)

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/repo/test_reproduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def test_get_active_graph(tmp_dir, dvc):
pre_foo_stage, = tmp_dir.dvc_gen({"pre-foo": "pre-foo"})
(pre_foo_stage,) = tmp_dir.dvc_gen({"pre-foo": "pre-foo"})
foo_stage = dvc.run(deps=["pre-foo"], outs=["foo"], cmd="echo foo > foo")
bar_stage = dvc.run(deps=["foo"], outs=["bar"], cmd="echo bar > bar")
baz_stage = dvc.run(deps=["foo"], outs=["baz"], cmd="echo baz > baz")
Expand Down

0 comments on commit 753aef4

Please sign in to comment.