🚨 Fixed DeepSource issues

This commit is contained in:
Mawoka
2023-06-14 16:33:44 +02:00
parent 6673a77b8a
commit db26082a00
28 changed files with 47 additions and 68 deletions
+1 -3
View File
@@ -103,15 +103,13 @@ class S3Storage:
+ "Signature="
+ signature
)
# if expiry is not None:
# authorization_header += f", Expires={expiry}"
# Send the request with the authorization header
headers = {"x-amz-date": amz_date, "Authorization": authorization_header}
request_url = self.base_url + path + "?" + canonical_querystring
return headers, request_url
# skipcq: PYL-W0613
async def upload(self, file: BinaryIO, file_name: str, mime_type: str | None = "application/octet-stream") -> None:
headers, url = self._generate_aws_signature_v4(method="PUT", path=f"/{file_name}")
async with ClientSession() as session, session.put(url, headers=headers, data=file) as resp: