mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-29 19:06:24 +02:00
chore: linting
This commit is contained in:
parent
5ae5a671e7
commit
17642493eb
43 changed files with 224 additions and 196 deletions
|
|
@ -225,18 +225,14 @@ class DropboxClient:
|
|||
|
||||
return all_items, None
|
||||
|
||||
async def get_metadata(
|
||||
self, path: str
|
||||
) -> tuple[dict[str, Any] | None, str | None]:
|
||||
async def get_metadata(self, path: str) -> tuple[dict[str, Any] | None, str | None]:
|
||||
resp = await self._request("/2/files/get_metadata", {"path": path})
|
||||
if resp.status_code != 200:
|
||||
return None, f"Failed to get metadata: {resp.status_code} - {resp.text}"
|
||||
return resp.json(), None
|
||||
|
||||
async def download_file(self, path: str) -> tuple[bytes | None, str | None]:
|
||||
resp = await self._content_request(
|
||||
"/2/files/download", {"path": path}
|
||||
)
|
||||
resp = await self._content_request("/2/files/download", {"path": path})
|
||||
if resp.status_code != 200:
|
||||
return None, f"Download failed: {resp.status_code}"
|
||||
return resp.content, None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue