mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 13:49:02 +08:00
Removed relative imports
Since the oauth module isn't just in a plugin anymore, there is no need for any of the relative imports CURA-5744
This commit is contained in:
parent
3830fa0fd9
commit
3ae223334f
@ -8,11 +8,9 @@ from typing import Optional
|
|||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
# As this module is specific for Cura plugins, we can rely on these imports.
|
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
|
|
||||||
# Plugin imports need to be relative to work in final builds.
|
from cura.OAuth2.Models import AuthenticationResponse, UserProfile, OAuth2Settings
|
||||||
from .models import AuthenticationResponse, UserProfile, OAuth2Settings
|
|
||||||
|
|
||||||
|
|
||||||
class AuthorizationHelpers:
|
class AuthorizationHelpers:
|
||||||
|
@ -5,9 +5,8 @@ from typing import Optional, Callable
|
|||||||
from http.server import BaseHTTPRequestHandler
|
from http.server import BaseHTTPRequestHandler
|
||||||
from urllib.parse import parse_qs, urlparse
|
from urllib.parse import parse_qs, urlparse
|
||||||
|
|
||||||
# Plugin imports need to be relative to work in final builds.
|
from cura.OAuth2.AuthorizationHelpers import AuthorizationHelpers
|
||||||
from .AuthorizationHelpers import AuthorizationHelpers
|
from cura.OAuth2.Models import AuthenticationResponse, ResponseData, HTTP_STATUS, ResponseStatus
|
||||||
from .models import AuthenticationResponse, ResponseData, HTTP_STATUS, ResponseStatus
|
|
||||||
|
|
||||||
|
|
||||||
class AuthorizationRequestHandler(BaseHTTPRequestHandler):
|
class AuthorizationRequestHandler(BaseHTTPRequestHandler):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
from http.server import HTTPServer
|
from http.server import HTTPServer
|
||||||
|
|
||||||
from .AuthorizationHelpers import AuthorizationHelpers
|
from cura.OAuth2.AuthorizationHelpers import AuthorizationHelpers
|
||||||
|
|
||||||
|
|
||||||
class AuthorizationRequestServer(HTTPServer):
|
class AuthorizationRequestServer(HTTPServer):
|
||||||
|
@ -10,9 +10,9 @@ from UM.Logger import Logger
|
|||||||
from UM.Signal import Signal
|
from UM.Signal import Signal
|
||||||
|
|
||||||
# Plugin imports need to be relative to work in final builds.
|
# Plugin imports need to be relative to work in final builds.
|
||||||
from .LocalAuthorizationServer import LocalAuthorizationServer
|
from cura.OAuth2.LocalAuthorizationServer import LocalAuthorizationServer
|
||||||
from .AuthorizationHelpers import AuthorizationHelpers
|
from cura.OAuth2.AuthorizationHelpers import AuthorizationHelpers
|
||||||
from .models import OAuth2Settings, AuthenticationResponse, UserProfile
|
from cura.OAuth2.Models import OAuth2Settings, AuthenticationResponse, UserProfile
|
||||||
|
|
||||||
|
|
||||||
class AuthorizationService:
|
class AuthorizationService:
|
||||||
|
@ -8,10 +8,10 @@ from typing import Optional, Callable
|
|||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
|
|
||||||
# Plugin imports need to be relative to work in final builds.
|
# Plugin imports need to be relative to work in final builds.
|
||||||
from .AuthorizationHelpers import AuthorizationHelpers
|
from cura.OAuth2.AuthorizationHelpers import AuthorizationHelpers
|
||||||
from .AuthorizationRequestServer import AuthorizationRequestServer
|
from cura.OAuth2.AuthorizationRequestServer import AuthorizationRequestServer
|
||||||
from .AuthorizationRequestHandler import AuthorizationRequestHandler
|
from cura.OAuth2.AuthorizationRequestHandler import AuthorizationRequestHandler
|
||||||
from .models import AuthenticationResponse
|
from cura.OAuth2.Models import AuthenticationResponse
|
||||||
|
|
||||||
|
|
||||||
class LocalAuthorizationServer:
|
class LocalAuthorizationServer:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user