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:
Jaime van Kessel 2018-09-21 12:02:11 +02:00
parent 3830fa0fd9
commit 3ae223334f
5 changed files with 11 additions and 14 deletions

View File

@ -8,11 +8,9 @@ from typing import Optional
import requests
# As this module is specific for Cura plugins, we can rely on these imports.
from UM.Logger import Logger
# Plugin imports need to be relative to work in final builds.
from .models import AuthenticationResponse, UserProfile, OAuth2Settings
from cura.OAuth2.Models import AuthenticationResponse, UserProfile, OAuth2Settings
class AuthorizationHelpers:

View File

@ -5,9 +5,8 @@ from typing import Optional, Callable
from http.server import BaseHTTPRequestHandler
from urllib.parse import parse_qs, urlparse
# Plugin imports need to be relative to work in final builds.
from .AuthorizationHelpers import AuthorizationHelpers
from .models import AuthenticationResponse, ResponseData, HTTP_STATUS, ResponseStatus
from cura.OAuth2.AuthorizationHelpers import AuthorizationHelpers
from cura.OAuth2.Models import AuthenticationResponse, ResponseData, HTTP_STATUS, ResponseStatus
class AuthorizationRequestHandler(BaseHTTPRequestHandler):

View File

@ -2,7 +2,7 @@
# Cura is released under the terms of the LGPLv3 or higher.
from http.server import HTTPServer
from .AuthorizationHelpers import AuthorizationHelpers
from cura.OAuth2.AuthorizationHelpers import AuthorizationHelpers
class AuthorizationRequestServer(HTTPServer):

View File

@ -10,9 +10,9 @@ from UM.Logger import Logger
from UM.Signal import Signal
# Plugin imports need to be relative to work in final builds.
from .LocalAuthorizationServer import LocalAuthorizationServer
from .AuthorizationHelpers import AuthorizationHelpers
from .models import OAuth2Settings, AuthenticationResponse, UserProfile
from cura.OAuth2.LocalAuthorizationServer import LocalAuthorizationServer
from cura.OAuth2.AuthorizationHelpers import AuthorizationHelpers
from cura.OAuth2.Models import OAuth2Settings, AuthenticationResponse, UserProfile
class AuthorizationService:

View File

@ -8,10 +8,10 @@ from typing import Optional, Callable
from UM.Logger import Logger
# Plugin imports need to be relative to work in final builds.
from .AuthorizationHelpers import AuthorizationHelpers
from .AuthorizationRequestServer import AuthorizationRequestServer
from .AuthorizationRequestHandler import AuthorizationRequestHandler
from .models import AuthenticationResponse
from cura.OAuth2.AuthorizationHelpers import AuthorizationHelpers
from cura.OAuth2.AuthorizationRequestServer import AuthorizationRequestServer
from cura.OAuth2.AuthorizationRequestHandler import AuthorizationRequestHandler
from cura.OAuth2.Models import AuthenticationResponse
class LocalAuthorizationServer: