mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Fix typing issues
CURA-6005
This commit is contained in:
parent
2275e5c71f
commit
8c07a6e89b
4 changed files with 11 additions and 10 deletions
|
@ -3,7 +3,7 @@ import base64
|
|||
import hashlib
|
||||
from datetime import datetime
|
||||
from tempfile import NamedTemporaryFile
|
||||
from typing import Optional, List, Dict
|
||||
from typing import Any, Optional, List, Dict
|
||||
|
||||
import requests
|
||||
|
||||
|
@ -34,7 +34,7 @@ class DriveApiService:
|
|||
"""Create a new instance of the Drive API service and set the cura_api object."""
|
||||
self._cura_api = cura_api
|
||||
|
||||
def getBackups(self) -> List[Dict[str, any]]:
|
||||
def getBackups(self) -> List[Dict[str, Any]]:
|
||||
"""Get all backups from the API."""
|
||||
access_token = self._cura_api.account.accessToken
|
||||
if not access_token:
|
||||
|
@ -85,7 +85,7 @@ class DriveApiService:
|
|||
else:
|
||||
self.onCreatingStateChanged.emit(is_creating=False)
|
||||
|
||||
def restoreBackup(self, backup: Dict[str, any]) -> None:
|
||||
def restoreBackup(self, backup: Dict[str, Any]) -> None:
|
||||
"""
|
||||
Restore a previously exported backup from cloud storage.
|
||||
:param backup: A dict containing an entry from the API list response.
|
||||
|
@ -157,7 +157,7 @@ class DriveApiService:
|
|||
return False
|
||||
return True
|
||||
|
||||
def _requestBackupUpload(self, backup_metadata: Dict[str, any], backup_size: int) -> Optional[str]:
|
||||
def _requestBackupUpload(self, backup_metadata: Dict[str, Any], backup_size: int) -> Optional[str]:
|
||||
"""
|
||||
Request a backup upload slot from the API.
|
||||
:param backup_metadata: A dict containing some meta data about the backup.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue