diff options
author | Aleš Mrázek <ales.mrazek@nic.cz> | 2024-08-29 15:31:23 +0200 |
---|---|---|
committer | Aleš Mrázek <ales.mrazek@nic.cz> | 2024-09-07 00:28:31 +0200 |
commit | 46ff46444cd31cebf403ff2c539099fa18f7bdd2 (patch) | |
tree | a040efa43f46ec46846034093c3bfa8d67bdbf55 /python/knot_resolver/controller | |
parent | python/knot_resolver: removed unnecessary use of typing_extensions lib (diff) | |
download | knot-resolver-46ff46444cd31cebf403ff2c539099fa18f7bdd2.tar.xz knot-resolver-46ff46444cd31cebf403ff2c539099fa18f7bdd2.zip |
python/knot_resolver: imports formatting
Diffstat (limited to 'python/knot_resolver/controller')
4 files changed, 12 insertions, 15 deletions
diff --git a/python/knot_resolver/controller/__init__.py b/python/knot_resolver/controller/__init__.py index 2398347e..5dc2fc55 100644 --- a/python/knot_resolver/controller/__init__.py +++ b/python/knot_resolver/controller/__init__.py @@ -12,8 +12,8 @@ import asyncio import logging from typing import List, Optional -from knot_resolver.datamodel.config_schema import KresConfig from knot_resolver.controller.interface import SubprocessController +from knot_resolver.datamodel.config_schema import KresConfig logger = logging.getLogger(__name__) diff --git a/python/knot_resolver/controller/interface.py b/python/knot_resolver/controller/interface.py index ba9ac28d..906592cb 100644 --- a/python/knot_resolver/controller/interface.py +++ b/python/knot_resolver/controller/interface.py @@ -10,10 +10,10 @@ from pathlib import Path from typing import Dict, Iterable, Optional, Type, TypeVar from weakref import WeakValueDictionary -from knot_resolver.manager.constants import kresd_config_file, policy_loader_config_file -from knot_resolver.datamodel.config_schema import KresConfig from knot_resolver.controller.exceptions import SubprocessControllerException from knot_resolver.controller.registered_workers import register_worker, unregister_worker +from knot_resolver.datamodel.config_schema import KresConfig +from knot_resolver.manager.constants import kresd_config_file, policy_loader_config_file from knot_resolver.utils.async_utils import writefile logger = logging.getLogger(__name__) diff --git a/python/knot_resolver/controller/supervisord/__init__.py b/python/knot_resolver/controller/supervisord/__init__.py index b9f3cae2..b55a7ef1 100644 --- a/python/knot_resolver/controller/supervisord/__init__.py +++ b/python/knot_resolver/controller/supervisord/__init__.py @@ -7,9 +7,7 @@ from xmlrpc.client import Fault, ServerProxy import supervisor.xmlrpc # type: ignore[import] from knot_resolver.compat.asyncio import async_in_a_thread -from knot_resolver.manager.constants import supervisord_config_file, supervisord_pid_file, supervisord_sock_file -from knot_resolver.datamodel.config_schema import KresConfig -from knot_resolver.controller.exceptions import SubprocessControllerExecException, SubprocessControllerException +from knot_resolver.controller.exceptions import SubprocessControllerException, SubprocessControllerExecException from knot_resolver.controller.interface import ( KresID, Subprocess, @@ -18,6 +16,8 @@ from knot_resolver.controller.interface import ( SubprocessType, ) from knot_resolver.controller.supervisord.config_file import SupervisordKresID, write_config_file +from knot_resolver.datamodel.config_schema import KresConfig +from knot_resolver.manager.constants import supervisord_config_file, supervisord_pid_file, supervisord_sock_file from knot_resolver.utils import which from knot_resolver.utils.async_utils import call, readfile diff --git a/python/knot_resolver/controller/supervisord/config_file.py b/python/knot_resolver/controller/supervisord/config_file.py index f9b80f91..a9144505 100644 --- a/python/knot_resolver/controller/supervisord/config_file.py +++ b/python/knot_resolver/controller/supervisord/config_file.py @@ -1,15 +1,15 @@ import logging import os - -from typing import Literal from dataclasses import dataclass from pathlib import Path +from typing import Literal + from jinja2 import Template -from knot_resolver.constants import ( - kres_cache_gc_executable, - kresd_executable, -) +from knot_resolver.constants import kres_cache_gc_executable, kresd_executable +from knot_resolver.controller.interface import KresID, SubprocessType +from knot_resolver.datamodel.config_schema import KresConfig +from knot_resolver.datamodel.logging_schema import LogTargetEnum from knot_resolver.manager.constants import ( kres_cache_dir, kresd_config_file_supervisord_pattern, @@ -21,9 +21,6 @@ from knot_resolver.manager.constants import ( supervisord_subprocess_log_dir, user_constants, ) -from knot_resolver.datamodel.config_schema import KresConfig -from knot_resolver.datamodel.logging_schema import LogTargetEnum -from knot_resolver.controller.interface import KresID, SubprocessType from knot_resolver.utils.async_utils import read_resource, writefile logger = logging.getLogger(__name__) |