Skip to content

Commit

Permalink
chore(types): fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
deveaud-m committed Nov 6, 2023
1 parent 1f03171 commit 94889b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions fossology/uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,13 @@ def upload_file(
data = dict
if vcs:
headers["uploadType"] = "vcs"
data = {"location": vcs}
data = {"location": vcs} # type: ignore
elif url:
headers["uploadType"] = "url"
data = {"location": url}
data = {"location": url} # type: ignore
elif server:
headers["uploadType"] = "server"
data = {"location": server}
data = {"location": server} # type: ignore
headers["Content-Type"] = "application/json"
response = self.session.post(
f"{self.api}/uploads", data=json.dumps(data), headers=headers
Expand Down
2 changes: 1 addition & 1 deletion tests/test_uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_get_uploads(
description="Test upload in subdirectory",
wait_time=5,
)
assert len(foss.list_uploads()[0]) == 2
assert len(foss.list_uploads()[0]) == 3
assert len(foss.list_uploads(folder=foss.rootFolder)[0]) == 2
assert len(foss.list_uploads(folder=foss.rootFolder, recursive=False)[0]) == 1
assert len(foss.list_uploads(folder=upload_subfolder)[0]) == 1
Expand Down

0 comments on commit 94889b1

Please sign in to comment.