mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 15:27:17 +00:00
optimize imports
This commit is contained in:
parent
3c068edf4f
commit
58379e7bf3
@ -20,7 +20,7 @@
|
||||
import sqlite3
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Tuple, TypeVar, Callable
|
||||
from typing import Any, Callable, Dict, Tuple, TypeVar
|
||||
|
||||
from ahriman.core.log import LazyLogging
|
||||
|
||||
|
@ -27,7 +27,7 @@ from ahriman.core.formatters.package_printer import PackagePrinter
|
||||
from ahriman.core.formatters.patch_printer import PatchPrinter
|
||||
from ahriman.core.formatters.status_printer import StatusPrinter
|
||||
from ahriman.core.formatters.tree_printer import TreePrinter
|
||||
from ahriman.core.formatters.validation_printer import ValidationPrinter
|
||||
from ahriman.core.formatters.update_printer import UpdatePrinter
|
||||
from ahriman.core.formatters.user_printer import UserPrinter
|
||||
from ahriman.core.formatters.validation_printer import ValidationPrinter
|
||||
from ahriman.core.formatters.version_printer import VersionPrinter
|
||||
|
@ -28,7 +28,7 @@ from ahriman.core.configuration import Configuration
|
||||
from ahriman.core.log import LazyLogging
|
||||
from ahriman.core.status.client import Client
|
||||
from ahriman.core.util import exception_response_text
|
||||
from ahriman.models.build_status import BuildStatusEnum, BuildStatus
|
||||
from ahriman.models.build_status import BuildStatus, BuildStatusEnum
|
||||
from ahriman.models.internal_status import InternalStatus
|
||||
from ahriman.models.package import Package
|
||||
from ahriman.models.user import User
|
||||
|
@ -29,7 +29,7 @@ import subprocess
|
||||
from enum import Enum
|
||||
from pathlib import Path
|
||||
from pwd import getpwuid
|
||||
from typing import Any, Callable, Dict, Generator, IO, Iterable, List, Optional, Type, TypeVar, Tuple, Union
|
||||
from typing import Any, Callable, Dict, Generator, IO, Iterable, List, Optional, Tuple, Type, TypeVar, Union
|
||||
|
||||
from ahriman.core.exceptions import OptionError, UnsafeRunError
|
||||
from ahriman.models.repository_paths import RepositoryPaths
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, List, Optional, Iterable
|
||||
from typing import Any, Iterable, List, Optional
|
||||
|
||||
from ahriman.core.exceptions import UnprocessedPackageStatusError
|
||||
from ahriman.models.package import Package
|
||||
|
@ -21,7 +21,7 @@ import aiohttp_security # type: ignore
|
||||
import socket
|
||||
import types
|
||||
|
||||
from aiohttp.web import middleware, Application, Request, StaticResource, StreamResponse
|
||||
from aiohttp.web import Application, Request, StaticResource, StreamResponse, middleware
|
||||
from aiohttp_session import setup as setup_session
|
||||
from aiohttp_session.cookie_storage import EncryptedCookieStorage
|
||||
from cryptography import fernet
|
||||
|
@ -2,7 +2,7 @@ import pytest
|
||||
|
||||
from pathlib import Path
|
||||
from pytest_mock import MockerFixture
|
||||
from unittest.mock import MagicMock, call as MockCall
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from ahriman.application.application.application_packages import ApplicationPackages
|
||||
from ahriman.models.package import Package
|
||||
|
@ -140,8 +140,7 @@ def test_configuration_create_devtools_mirror(args: argparse.Namespace, reposito
|
||||
"""
|
||||
must create configuration for the devtools with mirror set explicitly
|
||||
"""
|
||||
def get(section: str, key: str, *args: Any, **kwargs: Any) -> Any:
|
||||
del args
|
||||
def get(section: str, key: str, **kwargs: Any) -> Any:
|
||||
if section == "core" and key == "Include":
|
||||
return str(Setup.MIRRORLIST_PATH)
|
||||
return kwargs["fallback"]
|
||||
|
@ -18,7 +18,7 @@ def test_force_no_report(configuration: Configuration, database: SQLite, mocker:
|
||||
configuration.set_option("web", "port", "8080")
|
||||
load_mock = mocker.patch("ahriman.core.repository.Repository.load")
|
||||
|
||||
watcher = Watcher("x86_64", configuration, database)
|
||||
Watcher("x86_64", configuration, database)
|
||||
load_mock.assert_called_once_with("x86_64", configuration, database, report=False, unsafe=False)
|
||||
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import datetime
|
||||
import pytest
|
||||
import time
|
||||
|
||||
from unittest.mock import MagicMock, PropertyMock
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user