Skip to content

Commit

Permalink
Move imports to top of class (not a circular import).
Browse files Browse the repository at this point in the history
done as part of CURA-12067
  • Loading branch information
rburema committed Aug 15, 2024
1 parent db1d4d9 commit 2d82491
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions UM/TaskManagement/HttpRequestManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
from PyQt6.QtCore import QObject, QUrl, Qt, pyqtSignal, pyqtProperty
from PyQt6.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply

from UM.Application import Application
from UM.Logger import Logger
from UM.TaskManagement.HttpRequestData import HttpRequestData
from UM.TaskManagement.HttpRequestScope import HttpRequestScope
from UM.TaskManagement.HttpRequestScope import DefaultUserAgentScope, HttpRequestScope
from UM.TaskManagement.TaskManager import TaskManager


Expand Down Expand Up @@ -287,8 +288,6 @@ def _createRequest(self, http_method: str, url: str,
request.setRawHeader(key.encode("utf-8"), value.encode("utf-8"))

if scope is None:
from UM.TaskManagement.HttpRequestScope import DefaultUserAgentScope
from UM.Application import Application
scope = DefaultUserAgentScope(Application.getInstance())
scope.requestHook(request)

Expand Down

0 comments on commit 2d82491

Please sign in to comment.