Skip to content

Commit 59072f4

Browse files
author
Mr. Outis
committed
💅 revert black upgrade
1 parent a7525fc commit 59072f4

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

.restyled.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
restylers:
33
- name: black
4-
image: restyled/restyler-black:v19.10b0
4+
image: restyled/restyler-black:v19.3b0
55
command:
66
- black
77
arguments: []

dvc/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def get_url(path, repo=None, rev=None, remote=None):
1515
"""Returns an url of a resource specified by path in repo"""
1616
with _make_repo(repo, rev=rev) as _repo:
1717
abspath = os.path.join(_repo.root_dir, path)
18-
(out,) = _repo.find_outs_by_path(abspath)
18+
out, = _repo.find_outs_by_path(abspath)
1919
remote_obj = _repo.cloud.get_remote(remote)
2020
return str(remote_obj.checksum_to_path_info(out.checksum))
2121

dvc/repo/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def used_cache(
263263

264264
for stage in stages:
265265
if stage.is_repo_import:
266-
(dep,) = stage.deps
266+
dep, = stage.deps
267267
cache.external[dep.repo_pair].add(dep.def_path)
268268
continue
269269

@@ -445,7 +445,7 @@ def func(out):
445445

446446
def find_out_by_relpath(self, relpath):
447447
path = os.path.join(self.root_dir, relpath)
448-
(out,) = self.find_outs_by_path(path)
448+
out, = self.find_outs_by_path(path)
449449
return out
450450

451451
def is_dvc_internal(self, path):
@@ -457,7 +457,7 @@ def open(self, path, remote=None, mode="r", encoding=None):
457457
"""Opens a specified resource as a file descriptor"""
458458
cause = None
459459
try:
460-
(out,) = self.find_outs_by_path(path)
460+
out, = self.find_outs_by_path(path)
461461
except OutputNotFoundError as e:
462462
out = None
463463
cause = e

dvc/repo/get_url.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ def get_url(url, out=None):
1414

1515
out = os.path.abspath(out)
1616

17-
(dep,) = dependency.loads_from(None, [url])
18-
(out,) = output.loads_from(None, [out], use_cache=False)
17+
dep, = dependency.loads_from(None, [url])
18+
out, = output.loads_from(None, [out], use_cache=False)
1919
dep.download(out)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def run(self):
141141
]
142142

143143
if (sys.version_info) >= (3, 6):
144-
tests_requirements.append("black==19.10b0")
144+
tests_requirements.append("black==19.3b0")
145145

146146
setup(
147147
name="dvc",

tests/func/test_add.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333

3434
def test_add(tmp_dir, dvc):
35-
(stage,) = tmp_dir.dvc_gen({"foo": "foo"})
35+
stage, = tmp_dir.dvc_gen({"foo": "foo"})
3636
md5, _ = file_md5("foo")
3737

3838
assert stage is not None
@@ -50,7 +50,7 @@ def test_add_unicode(tmp_dir, dvc):
5050
with open("\xe1", "wb") as fd:
5151
fd.write("something".encode("utf-8"))
5252

53-
(stage,) = dvc.add("\xe1")
53+
stage, = dvc.add("\xe1")
5454

5555
assert os.path.isfile(stage.path)
5656

@@ -61,7 +61,7 @@ def test_add_unsupported_file(dvc):
6161

6262

6363
def test_add_directory(tmp_dir, dvc):
64-
(stage,) = tmp_dir.dvc_gen({"dir": {"file": "file"}})
64+
stage, = tmp_dir.dvc_gen({"dir": {"file": "file"}})
6565

6666
assert stage is not None
6767
assert len(stage.deps) == 0
@@ -162,7 +162,7 @@ def test_add_file_in_dir(tmp_dir, dvc):
162162
tmp_dir.gen({"dir": {"subdir": {"subdata": "subdata content"}}})
163163
subdir_path = os.path.join("dir", "subdir", "subdata")
164164

165-
(stage,) = dvc.add(subdir_path)
165+
stage, = dvc.add(subdir_path)
166166

167167
assert stage is not None
168168
assert len(stage.deps) == 0

tests/func/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def _set_remote_url_and_commit(repo, remote_url):
101101

102102
# FIXME: this test doesn't use scm ;D
103103
def test_open_scm_controlled(dvc_repo, repo_dir):
104-
(stage,) = dvc_repo.add(repo_dir.FOO)
104+
stage, = dvc_repo.add(repo_dir.FOO)
105105

106106
stage_content = open(stage.path, "r").read()
107107
with api.open(stage.path) as fd:

tests/func/test_commit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_commit_recursive(tmp_dir, dvc):
2020

2121
def test_commit_force(tmp_dir, dvc):
2222
tmp_dir.gen({"dir": {"file": "text1", "file2": "text2"}})
23-
(stage,) = dvc.add("dir", no_commit=True)
23+
stage, = dvc.add("dir", no_commit=True)
2424

2525
with dvc.state:
2626
assert stage.outs[0].changed_cache()
@@ -42,7 +42,7 @@ def test_commit_force(tmp_dir, dvc):
4242

4343
def test_commit_with_deps(tmp_dir, dvc, run_copy):
4444
tmp_dir.gen("foo", "foo")
45-
(foo_stage,) = dvc.add("foo", no_commit=True)
45+
foo_stage, = dvc.add("foo", no_commit=True)
4646
assert foo_stage is not None
4747
assert len(foo_stage.outs) == 1
4848

@@ -62,7 +62,7 @@ def test_commit_with_deps(tmp_dir, dvc, run_copy):
6262

6363
def test_commit_changed_md5(tmp_dir, dvc):
6464
tmp_dir.gen({"file": "file content"})
65-
(stage,) = dvc.add("file", no_commit=True)
65+
stage, = dvc.add("file", no_commit=True)
6666

6767
stage_file_content = load_stage_file(stage.path)
6868
stage_file_content["md5"] = "1111111111"

tests/func/test_gc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def test_all_commits(tmp_dir, scm, dvc):
192192

193193
def test_gc_no_dir_cache(tmp_dir, dvc, repo_template):
194194
dvc.add(["foo", "bar"])
195-
(dir_stage,) = dvc.add("dir")
195+
dir_stage, = dvc.add("dir")
196196

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

tests/func/test_stage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def test_remote_dependency(self):
155155

156156

157157
def test_md5_ignores_comments(repo_dir, dvc_repo):
158-
(stage,) = dvc_repo.add("foo")
158+
stage, = dvc_repo.add("foo")
159159

160160
with open(stage.path, "a") as f:
161161
f.write("# End comment\n")
@@ -165,7 +165,7 @@ def test_md5_ignores_comments(repo_dir, dvc_repo):
165165

166166

167167
def test_meta_is_preserved(dvc_repo):
168-
(stage,) = dvc_repo.add("foo")
168+
stage, = dvc_repo.add("foo")
169169

170170
# Add meta to DVC-file
171171
data = load_stage_file(stage.path)

0 commit comments

Comments
 (0)