reformatted code again

i should probably put Black in a commit hook or something
but nahhhh can't be that bad
This commit is contained in:
dogeystamp 2023-04-26 21:02:04 -04:00
parent bb3731cc6d
commit 2388bac57f
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
4 changed files with 10 additions and 17 deletions

View File

@ -30,10 +30,7 @@ class FilesMetadataAPI(ModelAPI):
try:
uuid.UUID(share_id)
except ValueError:
return jsonify(dict(
status="fail",
message=f"Invalid ID: '{share_id}'."
))
return jsonify(dict(status="fail", message=f"Invalid ID: '{share_id}'."))
share = Share.query.filter_by(share_id=share_id).first()
return super().delete(share)

View File

@ -251,8 +251,10 @@ class ModelListAPI(MethodView):
page_data = ModelClass.query.paginate(page=page, per_page=per_page)
data = [model.get_schema().dump(model) for model in page_data]
return jsonify(dict(
data=data,
prev=page_data.prev_num,
next=page_data.next_num,
))
return jsonify(
dict(
data=data,
prev=page_data.prev_num,
next=page_data.next_num,
)
)

View File

@ -91,9 +91,7 @@ class TestSuite:
resp = client.put(
url + "/content",
headers=auth("jeff"),
data={
"upload": FileStorage(stream=BytesIO(new_data), filename="upload")
},
data={"upload": FileStorage(stream=BytesIO(new_data), filename="upload")},
)
assert resp.status_code == 200
@ -105,7 +103,6 @@ class TestSuite:
assert resp.data == new_data
assert "filename=new_bin.bin" in resp.headers["Content-Disposition"].split("; ")
def test_invalid(self, client, users, auth, rand):
"""Test invalid requests."""

View File

@ -45,10 +45,7 @@ def test_files(client, users, auth):
per_page = 9
while page is not None:
resp = client.get(
"/files", headers=auth("jeff"), json=dict(
page=page,
per_page=per_page
)
"/files", headers=auth("jeff"), json=dict(page=page, per_page=per_page)
)
assert resp.status_code == 200