mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
style: sort imports in compute, db and services modules
This commit is contained in:
1 parent
38e9ddca09
commit
b9cdac487c
42 files changed
+247
-256
No files matched your search
@@ -14,8 +14,8 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from .authentication import AuthService
|
||||
from .access_tickets import AccessTicketService
|
||||
from .authentication import AuthService
|
||||
|
||||
auth_service = AuthService()
|
||||
access_ticket_service = AccessTicketService()
|
||||
@@ -14,22 +14,22 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from joserfc import jwt
|
||||
from joserfc.jwk import OctKey
|
||||
from joserfc.errors import JoseError, BadSignatureError
|
||||
import base64
|
||||
import json
|
||||
import logging
|
||||
import time
|
||||
from datetime import datetime, timedelta, timezone
|
||||
import bcrypt
|
||||
|
||||
from typing import Optional
|
||||
|
||||
import bcrypt
|
||||
from fastapi import HTTPException, status
|
||||
from gns3server.schemas.controller.tokens import TokenData
|
||||
from gns3server.config import Config
|
||||
from joserfc import jwt
|
||||
from joserfc.errors import BadSignatureError, JoseError
|
||||
from joserfc.jwk import OctKey
|
||||
from pydantic import ValidationError
|
||||
|
||||
import logging
|
||||
from gns3server.config import Config
|
||||
from gns3server.schemas.controller.tokens import TokenData
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -15,19 +15,18 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from uuid import UUID
|
||||
from typing import List, Union
|
||||
from uuid import UUID
|
||||
|
||||
from gns3server import schemas
|
||||
import gns3server.db.models as models
|
||||
|
||||
from gns3server.db.repositories.computes import ComputesRepository
|
||||
from gns3server import schemas
|
||||
from gns3server.controller import Controller
|
||||
from gns3server.controller.controller_error import (
|
||||
ControllerBadRequestError,
|
||||
ControllerNotFoundError,
|
||||
ControllerForbiddenError,
|
||||
ControllerNotFoundError,
|
||||
)
|
||||
from gns3server.db.repositories.computes import ComputesRepository
|
||||
|
||||
|
||||
class ComputesService:
|
||||
|
||||
@@ -16,23 +16,22 @@
|
||||
|
||||
import os
|
||||
import uuid
|
||||
import pydantic
|
||||
|
||||
from uuid import UUID
|
||||
from fastapi.encoders import jsonable_encoder
|
||||
from typing import List, Optional
|
||||
from uuid import UUID
|
||||
|
||||
import pydantic
|
||||
from fastapi.encoders import jsonable_encoder
|
||||
|
||||
import gns3server.db.models as models
|
||||
from gns3server import schemas
|
||||
from gns3server.config import Config
|
||||
import gns3server.db.models as models
|
||||
from gns3server.db.repositories.templates import TemplatesRepository
|
||||
from gns3server.controller.controller_error import (
|
||||
ControllerError,
|
||||
ControllerBadRequestError,
|
||||
ControllerNotFoundError,
|
||||
ControllerError,
|
||||
ControllerForbiddenError,
|
||||
ControllerNotFoundError,
|
||||
)
|
||||
|
||||
from gns3server.db.repositories.templates import TemplatesRepository
|
||||
|
||||
TEMPLATE_TYPE_TO_SCHEMA: dict[str, type[pydantic.BaseModel]] = {
|
||||
"cloud": schemas.CloudTemplate,
|
||||
|
||||
Reference in new issue
Block a user