Skip to content

Commit 7699ee3

Browse files
committed
isort
1 parent 9401f38 commit 7699ee3

4 files changed

Lines changed: 18 additions & 17 deletions

File tree

confection/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from ._registry import Promise, registry
1414
from .util import SimpleFrozenDict, SimpleFrozenList
1515

16-
1716
__all__ = [
1817
"Config",
1918
"Promise",

confection/tests/test_config_values.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55

66
import pytest
77
import srsly
8-
from hypothesis import given, strategies as st, settings, example, HealthCheck
9-
from numpy.testing import assert_equal, assert_allclose
8+
from hypothesis import HealthCheck, example, given, settings
9+
from hypothesis import strategies as st
10+
from numpy.testing import assert_allclose, assert_equal
11+
from pydantic import ValidationError
12+
1013
from confection import Config
1114
from confection._config import try_load_json
12-
from confection._registry import make_func_schema, get_func_fields
15+
from confection._registry import get_func_fields, make_func_schema
1316
from confection.tests.util import my_registry
14-
from pydantic import ValidationError
15-
1617

1718
# =============================================================================
1819
# Unit tests for try_load_json - the core parsing function

confection/tests/test_param_processing.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
"""
55

66
import inspect
7-
from typing import Any, Generator, Iterator, Iterable, List, Optional, Union, Sequence
7+
from typing import Any, Generator, Iterable, Iterator, List, Optional, Sequence, Union
88

99
import pytest
10-
from hypothesis import given, strategies as st, settings
10+
from hypothesis import given, settings
11+
from hypothesis import strategies as st
1112
from pydantic import Field
1213
from pydantic.fields import FieldInfo
1314

1415
from confection._registry import (
15-
process_param_annotation,
16-
process_param_default,
17-
get_param_field,
18-
_reorder_union_for_generators,
16+
ARGS_FIELD_ALIAS,
1917
_is_iterable_type,
2018
_is_sequence_type,
21-
ARGS_FIELD_ALIAS,
19+
_reorder_union_for_generators,
20+
get_param_field,
21+
process_param_annotation,
22+
process_param_default,
2223
)
2324

24-
2525
# =============================================================================
2626
# Strategies for type annotations
2727
# =============================================================================
@@ -92,7 +92,7 @@ def test_list_types_unchanged(self, annotation):
9292

9393
def test_union_with_generator_wrapped(self):
9494
"""Union with Generator should be wrapped with generator-safe validator."""
95-
from typing import get_origin, get_args, Annotated
95+
from typing import Annotated, get_args, get_origin
9696

9797
annotation = Union[float, List[float], Generator]
9898
result = process_param_annotation(annotation)
@@ -338,7 +338,7 @@ def test_var_positional_wraps_in_sequence(name, annotation):
338338
@settings(max_examples=100)
339339
def test_union_with_generators_wrapped(annotation):
340340
"""Property test: Unions containing generators should be wrapped in Annotated."""
341-
from typing import get_origin, get_args, Annotated
341+
from typing import Annotated, get_args, get_origin
342342

343343
result = process_param_annotation(annotation)
344344

confection/tests/test_pydantic_generators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""Focused tests to understand Pydantic v2's generator/iterator consumption behavior."""
22

3+
from typing import Generator, Iterable, Iterator, List, Union
4+
35
import pytest
4-
from typing import Generator, Iterator, Iterable, List, Union
56
from pydantic import BaseModel, Field, create_model
67

78

0 commit comments

Comments
 (0)