Skip to content

Commit

Permalink
Fix: Imports could be cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
hoh committed Apr 9, 2024
1 parent 553d1aa commit 4989892
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
8 changes: 1 addition & 7 deletions src/aleph/vm/controllers/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@
import sys
from pathlib import Path

from aleph.vm.hypervisors.firecracker.microvm import MicroVM
from aleph.vm.hypervisors.qemu.qemuvm import QemuVM
from aleph.vm.network.hostnetwork import Network, make_ipv6_allocator

try:
import sentry_sdk
except ImportError:
sentry_sdk = None

from aleph.vm.hypervisors.firecracker.microvm import MicroVM

from .configuration import (
Configuration,
HypervisorType,
Expand Down
6 changes: 1 addition & 5 deletions src/aleph/vm/guest_api/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@

import aiohttp
import aioredis
import sentry_sdk
from aiohttp import web
from setproctitle import setproctitle

from aleph.vm.conf import settings
from aleph.vm.version import get_version_from_apt, get_version_from_git

try:
import sentry_sdk
except ImportError:
sentry_sdk = None

logger = logging.getLogger(__name__)

ALEPH_API_SERVER = "https://official.aleph.cloud"
Expand Down
14 changes: 4 additions & 10 deletions src/aleph/vm/orchestrator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,16 @@
from statistics import mean
from typing import Callable, Optional, cast

from aiohttp.web import Request, Response
from sqlalchemy.ext.asyncio import create_async_engine

from aleph.vm.version import get_version_from_apt, get_version_from_git

try:
import sentry_sdk
except ImportError:
sentry_sdk = None

import alembic.command
import alembic.config
import sentry_sdk
from aiohttp.web import Request, Response
from aleph_message.models import ItemHash
from sqlalchemy.ext.asyncio import create_async_engine

from aleph.vm.conf import ALLOW_DEVELOPER_SSH_KEYS, make_db_url, settings
from aleph.vm.pool import VmPool
from aleph.vm.version import get_version_from_apt, get_version_from_git

from . import metrics, supervisor
from .pubsub import PubSub
Expand Down
1 change: 0 additions & 1 deletion src/aleph/vm/orchestrator/views/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import binascii
import logging
from collections.abc import Awaitable
from decimal import Decimal
from hashlib import sha256
from json import JSONDecodeError
Expand Down

0 comments on commit 4989892

Please sign in to comment.