make all same-module imports relative, the rest absolute

This makes sorting more consitent.
This commit is contained in:
Jörg Thalheim
2024-09-02 12:55:07 +02:00
parent 9fea3f909e
commit b313f2d066
56 changed files with 196 additions and 185 deletions

View File

@@ -152,7 +152,7 @@ API.register(open_file)
def to_json_schema(self) -> dict[str, Any]:
from typing import get_type_hints
from clan_cli.api.util import type_to_dict
from .util import type_to_dict
api_schema: dict[str, Any] = {
"$comment": "An object containing API methods. ",

View File

@@ -1,4 +1,3 @@
from clan_cli.api import API
from clan_cli.inventory import (
AdminConfig,
ServiceAdmin,
@@ -9,6 +8,8 @@ from clan_cli.inventory import (
save_inventory,
)
from . import API
@API.register
def get_admin_service(base_url: str) -> ServiceAdmin | None:

View File

@@ -3,7 +3,7 @@
import argparse
import json
from clan_cli.api import API
from . import API
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Debug the API.")

View File

@@ -1,4 +1,3 @@
from clan_cli.api import API
from clan_cli.inventory import (
ServiceMeta,
ServiceSingleDisk,
@@ -10,6 +9,8 @@ from clan_cli.inventory import (
save_inventory,
)
from . import API
def get_instance_name(machine_name: str) -> str:
return f"{machine_name}-single-disk"