core: cleanup/sort imports according to ruff check --select I
This commit is contained in:
parent
7023088d13
commit
478e288ea8
45 changed files with 235 additions and 170 deletions
|
@ -10,16 +10,27 @@ import importlib
|
|||
import inspect
|
||||
import itertools
|
||||
from datetime import datetime
|
||||
from typing import TypeVar, Tuple, Optional, Union, Callable, Iterable, Iterator, Dict, Any, NamedTuple, List
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
Iterable,
|
||||
Iterator,
|
||||
List,
|
||||
NamedTuple,
|
||||
Optional,
|
||||
Tuple,
|
||||
TypeVar,
|
||||
Union,
|
||||
)
|
||||
|
||||
import more_itertools
|
||||
|
||||
from . import error as err
|
||||
from .types import is_namedtuple
|
||||
from .error import Res, unwrap
|
||||
from .types import is_namedtuple
|
||||
from .warnings import low
|
||||
|
||||
|
||||
T = TypeVar("T")
|
||||
ET = Res[T]
|
||||
|
||||
|
@ -687,9 +698,10 @@ def test_raise_exceptions() -> None:
|
|||
|
||||
def test_wrap_unsortable_with_error_and_warning() -> None:
|
||||
|
||||
import pytest
|
||||
from collections import Counter
|
||||
|
||||
import pytest
|
||||
|
||||
# by default should wrap unsortable (error)
|
||||
with pytest.warns(UserWarning, match=r"encountered exception"):
|
||||
res = list(select(_mixed_iter_errors(), order_value=lambda o: isinstance(o, datetime)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue