Skip to content

Commit

Permalink
ruff --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maldoinc committed Nov 16, 2023
1 parent a39d9aa commit 8857e3d
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 36 deletions.
3 changes: 1 addition & 2 deletions test/performance_test/test_inject_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from dataclasses import dataclass

from typing_extensions import Annotated

from wireup import ParameterBag, DependencyContainer, Wire
from wireup import DependencyContainer, ParameterBag, Wire


@dataclass(frozen=True)
Expand Down
1 change: 0 additions & 1 deletion test/services/foo_service.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from dataclasses import dataclass

from test.services.db_service import DbService


Expand Down
14 changes: 7 additions & 7 deletions test/test_container.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import datetime
import unittest
from dataclasses import dataclass
from typing_extensions import Annotated
from unittest.mock import Mock, patch

from test import services
from test.fixtures import Counter, FooBar, FooBase, FooBaz
from test.services.random_service import RandomService
from test.services.truly_random_service import TrulyRandomService
from wireup import Wire, wire, ServiceLifetime, register_all_in_module
from unittest.mock import Mock, patch

from typing_extensions import Annotated
from wireup import ServiceLifetime, Wire, register_all_in_module, wire
from wireup.errors import (
DuplicateQualifierForInterfaceError,
DuplicateServiceRegistrationError,
UnknownQualifiedServiceRequestedError,
UsageOfQualifierOnUnknownObjectError,
UnknownServiceRequestedError,
DuplicateQualifierForInterfaceError,
UsageOfQualifierOnUnknownObjectError,
)
from wireup.ioc.types import ParameterWrapper, AnnotatedParameter
from wireup.ioc.dependency_container import ContainerProxy, DependencyContainer
from wireup.ioc.parameter import ParameterBag, TemplatedString
from wireup.ioc.types import AnnotatedParameter, ParameterWrapper


class TestContainer(unittest.IsolatedAsyncioTestCase):
Expand Down
7 changes: 3 additions & 4 deletions test/test_container_optimized.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import unittest
from dataclasses import dataclass
from test.fixtures import FooBar, FooBase, FooBaz
from test.services.random_service import RandomService

from typing_extensions import Annotated

from test.fixtures import FooBase, FooBar, FooBaz
from test.services.random_service import RandomService
from wireup import DependencyContainer, ParameterBag, Wire, ServiceLifetime
from wireup import DependencyContainer, ParameterBag, ServiceLifetime, Wire


@dataclass
Expand Down
11 changes: 5 additions & 6 deletions test/test_container_static_factory.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from dataclasses import dataclass
from unittest import TestCase

from test.fixtures import Counter, FooBar, FooBase
from test.services.random_service import RandomService
from wireup import DependencyContainer, ParameterBag, wire, ServiceLifetime
from unittest import TestCase

from wireup import DependencyContainer, ParameterBag, ServiceLifetime, wire
from wireup.errors import (
FactoryReturnTypeIsEmptyError,
FactoryDuplicateServiceRegistrationError,
DuplicateServiceRegistrationError,
FactoryDuplicateServiceRegistrationError,
FactoryReturnTypeIsEmptyError,
)


Expand Down
2 changes: 1 addition & 1 deletion test/test_initialization_context.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest

from test.services.db_service import DbService

from wireup.ioc.initialization_context import InitializationContext
from wireup.ioc.types import AnnotatedParameter

Expand Down
2 changes: 1 addition & 1 deletion test/test_parameter.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import unittest

from wireup.errors import UnknownParameterError
from wireup.ioc.types import ParameterWrapper
from wireup.ioc.parameter import ParameterBag, TemplatedString
from wireup.ioc.types import ParameterWrapper


class TestParameterBag(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion test/test_parameter_enum.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from unittest import TestCase

from wireup import ParameterEnum, ParameterBag, DependencyContainer
from wireup import DependencyContainer, ParameterBag, ParameterEnum
from wireup.ioc.types import ParameterWrapper


Expand Down
7 changes: 3 additions & 4 deletions test/test_service_registry.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import unittest
from test.services.random_service import RandomService

from typing_extensions import Annotated

from test.services.random_service import RandomService
from wireup import ServiceLifetime, Wire
from wireup.errors import (
DuplicateServiceRegistrationError,
FactoryReturnTypeIsEmptyError,
FactoryDuplicateServiceRegistrationError,
FactoryReturnTypeIsEmptyError,
)
from wireup.ioc.types import ParameterWrapper, AnnotatedParameter
from wireup.ioc.service_registry import _ServiceRegistry
from wireup.ioc.types import AnnotatedParameter, ParameterWrapper


class TestServiceRegistry(unittest.TestCase):
Expand Down
11 changes: 2 additions & 9 deletions test/test_util.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
import inspect
import unittest
from typing import Union, Dict, List, Tuple
from typing import Dict, List, Tuple, Union

from typing_extensions import Annotated

from test import services
from test.services.baz_service import BazService
from test.services.db_service import DbService
from test.services.foo_service import FooService
from test.services.random_service import RandomService
from test.services.truly_random_service import TrulyRandomService
from wireup.ioc.types import AnnotatedParameter
from wireup.ioc.util import (
parameter_get_type_and_annotation,
is_type_autowireable,
parameter_get_type_and_annotation,
)


Expand Down

0 comments on commit 8857e3d

Please sign in to comment.