mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:45:52 +08:00
Fix typing for optional callback for on_progress
This commit is contained in:
parent
c07fea1405
commit
a766effce8
@ -203,7 +203,7 @@ class NetworkClient:
|
||||
## Does a POST request with form data to the given URL.
|
||||
def postForm(self, url: str, header_data: str, body_data: bytes,
|
||||
on_finished: Optional[Callable[[QNetworkReply], None]],
|
||||
on_progress: Callable = None) -> None:
|
||||
on_progress: Optional[Callable[[int, int], None]] = None) -> None:
|
||||
post_part = QHttpPart()
|
||||
post_part.setHeader(QNetworkRequest.ContentDispositionHeader, header_data)
|
||||
post_part.setBody(body_data)
|
||||
@ -212,7 +212,7 @@ class NetworkClient:
|
||||
## Does a POST request with form parts to the given URL.
|
||||
def postFormWithParts(self, target: str, parts: List[QHttpPart],
|
||||
on_finished: Optional[Callable[[QNetworkReply], None]],
|
||||
on_progress: Callable = None) -> Optional[QNetworkReply]:
|
||||
on_progress: Optional[Callable[[int, int], None]] = None) -> Optional[QNetworkReply]:
|
||||
self._validateManager()
|
||||
|
||||
request = self._createEmptyRequest(target, content_type = None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user