1
0
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:
thatmattlove
2021-12-22 22:22:01 -07:00
parent 3cf84a8001
commit dfca1a5bc1
9 changed files with 22 additions and 60 deletions

View File

@@ -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

View File

@@ -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",)

View File

@@ -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, ...]]

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"]