style: sort imports in compute, db and services modules

This commit is contained in:
Mark Paronyan committed 2026-10-02 12:43:26 +03:00
1 parent 38e9ddca09
commit b9cdac487c
42 files changed
+247 -256

No files matched your search

+1 -1
View File
@@ -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()
+8 -8
View File
@@ -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__)
+4 -5
View File
@@ -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:
+8 -9
View File
@@ -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,