Skip to content

Commit 52635fd

Browse files
committed
reformat/lint
1 parent db79d0e commit 52635fd

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

tests/unit/packaging/test_utils.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ def test_render_simple_detail(db_request, monkeypatch, jinja):
4343
assert fake_hasher.hexdigest.calls == [pretend.call()]
4444

4545
assert content_hash == "deadbeefdeadbeefdeadbeefdeadbeef"
46-
assert path == f"{project.normalized_name}/deadbeefdeadbeefdeadbeefdeadbeef.{project.normalized_name}.html"
46+
assert path == (
47+
f"{project.normalized_name}/deadbeefdeadbeefdeadbeefdeadbeef"
48+
+ f".{project.normalized_name}.html"
49+
)
4750

4851

4952
def test_render_simple_detail_with_store(db_request, monkeypatch, jinja):
@@ -97,7 +100,10 @@ def __exit__(self, type, value, traceback):
97100

98101
assert storage_service.store.calls == [
99102
pretend.call(
100-
f"{project.normalized_name}/deadbeefdeadbeefdeadbeefdeadbeef.{project.normalized_name}.html",
103+
(
104+
f"{project.normalized_name}/deadbeefdeadbeefdeadbeefdeadbeef"
105+
+ f".{project.normalized_name}.html"
106+
),
101107
"/tmp/wutang",
102108
meta={
103109
"project": project.normalized_name,
@@ -117,4 +123,7 @@ def __exit__(self, type, value, traceback):
117123
]
118124

119125
assert content_hash == "deadbeefdeadbeefdeadbeefdeadbeef"
120-
assert path == f"{project.normalized_name}/deadbeefdeadbeefdeadbeefdeadbeef.{project.normalized_name}.html"
126+
assert path == (
127+
f"{project.normalized_name}/deadbeefdeadbeefdeadbeefdeadbeef"
128+
+ f".{project.normalized_name}.html"
129+
)

warehouse/packaging/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ def render_simple_detail(project, request, store=False):
4747
content_hasher.update(content.encode("utf-8"))
4848
content_hash = content_hasher.hexdigest().lower()
4949

50-
simple_detail_path = f"{project.normalized_name}/{content_hash}.{project.normalized_name}.html"
50+
simple_detail_path = (
51+
f"{project.normalized_name}/{content_hash}.{project.normalized_name}.html"
52+
)
5153

5254
if store:
5355
storage = request.find_service(ISimpleStorage)

0 commit comments

Comments
 (0)