jw.util, jwutils: Follow jw-pkg's move to isort
"make format", as defined by jw-pkg, now sorts the order or imports, too. So do that and commit. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
4cf319aefd
commit
2d847b4ccd
46 changed files with 120 additions and 112 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import argparse
|
||||
from typing import Any, Iterable, override
|
||||
|
||||
from collections import OrderedDict
|
||||
from typing import Any, Iterable, override
|
||||
|
||||
from .log import get_caller_pos, slog
|
||||
|
||||
|
|
|
|||
|
|
@ -6,12 +6,11 @@ import re
|
|||
import sys
|
||||
|
||||
from collections.abc import Iterator, Mapping
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Any, override
|
||||
|
||||
from .log import DEBUG, ERR, get_caller_pos, slog
|
||||
from .stree import serdes
|
||||
from .log import DEBUG, ERR, slog, get_caller_pos
|
||||
from .stree.StringTree import StringTree
|
||||
|
||||
# Default file mode mask for secret-checking: reject group-write or
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import io
|
||||
import os
|
||||
import sys
|
||||
from fcntl import fcntl, F_GETFL, F_SETFL
|
||||
|
||||
from fcntl import F_GETFL, F_SETFL, fcntl
|
||||
from typing import Any
|
||||
|
||||
class RedirectStdIO: # export
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import re
|
||||
from typing import Any, cast, override
|
||||
|
||||
from collections import namedtuple
|
||||
from typing import Any, cast, override
|
||||
|
||||
from ..log import DEBUG, get_caller_pos, prio_gets_logged, slog
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import asyncio
|
||||
import re
|
||||
|
||||
from typing import Any, override
|
||||
|
||||
from ..log import DEBUG, ERR, INFO, WARNING, slog
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
import abc
|
||||
|
||||
from enum import Enum, Flag, auto
|
||||
from typing import TYPE_CHECKING, Any, cast, Self, TypeAlias, Sequence
|
||||
from typing import TYPE_CHECKING, Any, Self, Sequence, TypeAlias, cast
|
||||
|
||||
from ..Config import Config
|
||||
from ..enum_helper import kebab_to_pascal
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Any, TYPE_CHECKING, override
|
||||
from typing import TYPE_CHECKING, Any, override
|
||||
|
||||
from ...Config import Config
|
||||
from ...log import WARNING, slog
|
||||
|
|
@ -8,8 +8,8 @@ from ..Auth import Access
|
|||
from ..Auth import Auth as AuthBase
|
||||
from ..Auth import Entity as EntityBase
|
||||
from ..Auth import Group as Group # Needed by jwutils utility layer
|
||||
from ..Auth import User as User # Needed by jwutils utility layer
|
||||
from ..Auth import Kind, ProjectFlags
|
||||
from ..Auth import User as User # Needed by jwutils utility layer
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import Mapping, Sequence
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Any, override
|
|||
|
||||
import ldap # type: ignore[import-untyped]
|
||||
|
||||
from ...ldap import bind, Connection
|
||||
from ...ldap import Connection, bind
|
||||
from ...log import DEBUG, ERR, WARNING, slog
|
||||
from ..Auth import Access
|
||||
from ..Auth import Auth as AuthBase
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
from typing import Any
|
||||
|
||||
import os
|
||||
|
||||
from collections import OrderedDict
|
||||
from datetime import timedelta
|
||||
from typing import Any
|
||||
|
||||
import pytimeparse # type: ignore[import-untyped]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import abc
|
||||
|
||||
from typing import Any
|
||||
|
||||
class Session(abc.ABC): # export
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
from __future__ import annotations
|
||||
from typing import Any, cast, TYPE_CHECKING, override
|
||||
|
||||
import abc
|
||||
|
||||
from ...log import slog, slog_m, ERR, INFO
|
||||
from typing import TYPE_CHECKING, Any, cast, override
|
||||
|
||||
from ...log import ERR, INFO, slog, slog_m
|
||||
from ...misc import load_classes
|
||||
from ..DataBase import DataBase
|
||||
from .Query import Query as QueryBase
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
import abc
|
||||
|
||||
from enum import Enum, auto
|
||||
from typing import TYPE_CHECKING, Any, cast, Union
|
||||
from typing import TYPE_CHECKING, Any, Union, cast
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..DataBase import DataBase
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from typing import Any, cast
|
|||
|
||||
from tabulate import TableFormat, tabulate # type: ignore[import-untyped]
|
||||
|
||||
from ..log import (ERR, INFO, WARNING, get_caller_pos, prio_gets_logged, slog, slog_m)
|
||||
from ..log import ERR, INFO, WARNING, get_caller_pos, prio_gets_logged, slog, slog_m
|
||||
|
||||
def rows_pretty(rows: Any) -> str: # export
|
||||
if isinstance(rows, dict):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Optional, Any, override
|
||||
from typing import Any, Optional, override
|
||||
|
||||
class ColumnSet: # export
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||
|
||||
import abc
|
||||
|
||||
from typing import TYPE_CHECKING, Any, cast, override, Iterable, Optional
|
||||
from typing import TYPE_CHECKING, Any, Iterable, Optional, cast, override
|
||||
|
||||
from ...log import DEBUG, ERR, slog, throw
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import abc
|
|||
import re
|
||||
|
||||
from collections import OrderedDict
|
||||
from typing import TYPE_CHECKING, Any, Self, cast, override, Iterable
|
||||
from typing import TYPE_CHECKING, Any, Iterable, Self, cast, override
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
from ...log import ERR, WARNING, slog, throw
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import inspect
|
|||
|
||||
from functools import wraps
|
||||
from types import CodeType, FunctionType
|
||||
from typing import (TYPE_CHECKING, Concatenate, Generic, ParamSpec, TypeVar, overload)
|
||||
from typing import TYPE_CHECKING, Concatenate, Generic, ParamSpec, TypeVar, overload
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from typing import Any, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import re # noqa: E402
|
||||
|
||||
from copy import deepcopy
|
||||
from pathlib import Path
|
||||
from typing import Any, cast, TypeAlias
|
||||
|
||||
import re # noqa: E402
|
||||
from typing import Any, TypeAlias, cast
|
||||
|
||||
import yaml # type: ignore[import-untyped]
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue