mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -06:00
Fix typing for optional callback for on_progress
This commit is contained in:
parent
c07fea1405
commit
a766effce8
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue