Skip to content

Commit

Permalink
chore(types): fix type check errors
Browse files Browse the repository at this point in the history
  • Loading branch information
deveaud-m committed Apr 4, 2024
1 parent ed20402 commit bddde15
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions fossology/uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def upload_file(
:raises FossologyApiError: if the REST call failed
:raises AuthorizationError: if the REST call is not authorized
"""
data = {
data: dict = {
"folderId": str(folder.id),
"uploadDescription": description,
"public": access_level.value
Expand Down Expand Up @@ -270,14 +270,13 @@ def upload_file(
)
elif vcs or url or server:
if vcs:
data["location"] = vcs
print(data)
data["location"] = vcs # type: ignore
data["uploadType"] = headers["uploadType"] = "vcs"
elif url:
data["location"] = url
data["location"] = url # type: ignore
data["uploadType"] = headers["uploadType"] = "url"
elif server:
data["location"] = server
data["location"] = server # type: ignore
data["uploadType"] = headers["uploadType"] = "server"
headers["Content-Type"] = "application/json"
response = self.session.post(
Expand Down

0 comments on commit bddde15

Please sign in to comment.