mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
Move isort configuration to pyproject.toml
This commit is contained in:
14
.isort.cfg
14
.isort.cfg
@@ -1,14 +0,0 @@
|
||||
[settings]
|
||||
skip_glob = hyperglass/api/examples/*.py
|
||||
line_length = 88
|
||||
indent = ' '
|
||||
include_trailing_comma = True
|
||||
multi_line_output = 3
|
||||
balanced_wrapping = True
|
||||
length_sort = True
|
||||
force_single_line = False
|
||||
import_heading_stdlib = Standard Library
|
||||
import_heading_thirdparty = Third Party
|
||||
import_heading_firstparty = Project
|
||||
import_heading_localfolder = Local
|
||||
known_third_party = starlette,fastapi,inquirer
|
||||
@@ -5,13 +5,7 @@ from hyperglass.state import use_state
|
||||
from hyperglass.defaults.directives import init_builtin_directives
|
||||
|
||||
# Local
|
||||
from .validate import (
|
||||
init_files,
|
||||
init_params,
|
||||
init_devices,
|
||||
init_ui_params,
|
||||
init_directives,
|
||||
)
|
||||
from .validate import init_files, init_params, init_devices, init_ui_params, init_directives
|
||||
|
||||
__all__ = ("init_user_config",)
|
||||
|
||||
|
||||
@@ -9,11 +9,7 @@ from hyperglass.log import log
|
||||
from hyperglass.util import run_coroutine_in_new_thread
|
||||
from hyperglass.settings import Settings
|
||||
from hyperglass.constants import CONFIG_EXTENSIONS
|
||||
from hyperglass.exceptions.private import (
|
||||
ConfigError,
|
||||
ConfigMissing,
|
||||
ConfigLoaderMissing,
|
||||
)
|
||||
from hyperglass.exceptions.private import ConfigError, ConfigMissing, ConfigLoaderMissing
|
||||
|
||||
LoadedConfig = t.Union[t.Dict[str, t.Any], t.List[t.Any], t.Tuple[t.Any, ...]]
|
||||
|
||||
|
||||
@@ -8,12 +8,7 @@ import httpx
|
||||
|
||||
# Project
|
||||
from hyperglass.util import get_fmt_keys
|
||||
from hyperglass.exceptions.public import (
|
||||
AuthError,
|
||||
RestError,
|
||||
DeviceTimeout,
|
||||
ResponseEmpty,
|
||||
)
|
||||
from hyperglass.exceptions.public import AuthError, RestError, DeviceTimeout, ResponseEmpty
|
||||
|
||||
# Local
|
||||
from ._common import Connection
|
||||
|
||||
@@ -14,12 +14,7 @@ from gunicorn.app.base import BaseApplication # type: ignore
|
||||
# Local
|
||||
from .log import CustomGunicornLogger, log, setup_lib_logging
|
||||
from .util import get_node_version
|
||||
from .plugins import (
|
||||
InputPluginManager,
|
||||
OutputPluginManager,
|
||||
register_plugin,
|
||||
init_builtin_plugins,
|
||||
)
|
||||
from .plugins import InputPluginManager, OutputPluginManager, register_plugin, init_builtin_plugins
|
||||
from .constants import MIN_NODE_VERSION, MIN_PYTHON_VERSION, __version__
|
||||
|
||||
# Ensure the Python version meets the minimum requirements.
|
||||
|
||||
@@ -14,11 +14,7 @@ from hyperglass.log import log
|
||||
from hyperglass.util import snake_to_camel, repr_from_attrs
|
||||
from hyperglass.state import use_state
|
||||
from hyperglass.plugins import InputPluginManager
|
||||
from hyperglass.exceptions.public import (
|
||||
InputInvalid,
|
||||
QueryTypeNotFound,
|
||||
QueryLocationNotFound,
|
||||
)
|
||||
from hyperglass.exceptions.public import InputInvalid, QueryTypeNotFound, QueryLocationNotFound
|
||||
from hyperglass.exceptions.private import InputValidationError
|
||||
|
||||
# Local
|
||||
|
||||
@@ -6,15 +6,7 @@ import typing as t
|
||||
from ipaddress import IPv4Network, IPv6Network, ip_network
|
||||
|
||||
# Third Party
|
||||
from pydantic import (
|
||||
Field,
|
||||
FilePath,
|
||||
StrictStr,
|
||||
StrictBool,
|
||||
PrivateAttr,
|
||||
conint,
|
||||
validator,
|
||||
)
|
||||
from pydantic import Field, FilePath, StrictStr, StrictBool, PrivateAttr, conint, validator
|
||||
|
||||
# Project
|
||||
from hyperglass.log import log
|
||||
|
||||
@@ -6,14 +6,7 @@ from pathlib import Path
|
||||
from ipaddress import ip_address
|
||||
|
||||
# Third Party
|
||||
from pydantic import (
|
||||
RedisDsn,
|
||||
SecretStr,
|
||||
BaseSettings,
|
||||
DirectoryPath,
|
||||
IPvAnyAddress,
|
||||
validator,
|
||||
)
|
||||
from pydantic import RedisDsn, SecretStr, BaseSettings, DirectoryPath, IPvAnyAddress, validator
|
||||
|
||||
# Project
|
||||
from hyperglass.util import at_least, cpu_count
|
||||
|
||||
@@ -82,6 +82,21 @@ taskipy = "^1.8.2"
|
||||
[tool.black]
|
||||
line-length = 100
|
||||
|
||||
[tool.isort]
|
||||
balanced_wrapping = true
|
||||
force_single_line = false
|
||||
import_heading_firstparty = "Project"
|
||||
import_heading_localfolder = "Local"
|
||||
import_heading_stdlib = "Standard Library"
|
||||
import_heading_thirdparty = "Third Party"
|
||||
include_trailing_comma = true
|
||||
indent = ' '
|
||||
known_third_party = ["starlette", "fastapi", "inquirer"]
|
||||
length_sort = true
|
||||
line_length = 100
|
||||
multi_line_output = 3
|
||||
skip_glob = "hyperglass/api/examples/*.py"
|
||||
|
||||
[tool.pyright]
|
||||
exclude = ["**/node_modules", "**/ui", "**/__pycache__"]
|
||||
include = ["hyperglass"]
|
||||
|
||||
Reference in New Issue
Block a user