mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 13:17:51 -06:00
Fix typing issues
CURA-7290
This commit is contained in:
parent
94f094380b
commit
8f22e62675
1 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
||||||
# !/usr/bin/env python
|
# !/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply
|
from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply
|
||||||
from typing import Callable, Any, Tuple
|
from typing import Callable, Any, Tuple, cast, Dict, Optional
|
||||||
|
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
from UM.TaskManagement.HttpRequestManager import HttpRequestManager
|
from UM.TaskManagement.HttpRequestManager import HttpRequestManager
|
||||||
|
@ -78,14 +78,14 @@ class ToolPathUploader:
|
||||||
content_range = "bytes {}-{}/{}".format(first_byte, last_byte - 1, len(self._data))
|
content_range = "bytes {}-{}/{}".format(first_byte, last_byte - 1, len(self._data))
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
"Content-Type": self._print_job.content_type,
|
"Content-Type": cast(str, self._print_job.content_type),
|
||||||
"Content-Range": content_range
|
"Content-Range": content_range
|
||||||
}
|
} # type: Dict[str, str]
|
||||||
|
|
||||||
Logger.log("i", "Uploading %s to %s", content_range, self._print_job.upload_url)
|
Logger.log("i", "Uploading %s to %s", content_range, self._print_job.upload_url)
|
||||||
|
|
||||||
self._http.put(
|
self._http.put(
|
||||||
url = self._print_job.upload_url,
|
url = cast(str, self._print_job.upload_url),
|
||||||
headers_dict = headers,
|
headers_dict = headers,
|
||||||
data = self._data[first_byte:last_byte],
|
data = self._data[first_byte:last_byte],
|
||||||
callback = self._finishedCallback,
|
callback = self._finishedCallback,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue