diff --git a/examples/aggregate6/application.py b/examples/aggregate6/application.py index b20810de..25d7dcb0 100644 --- a/examples/aggregate6/application.py +++ b/examples/aggregate6/application.py @@ -3,11 +3,7 @@ from typing import TYPE_CHECKING, Any, Dict from eventsourcing.application import Application -from examples.aggregate6.domainmodel import ( - add_trick, - project_dog, - register_dog, -) +from examples.aggregate6.domainmodel import add_trick, project_dog, register_dog if TYPE_CHECKING: # pragma: nocover from uuid import UUID diff --git a/examples/aggregate6a/application.py b/examples/aggregate6a/application.py index 7c9e75e8..dbf094e9 100644 --- a/examples/aggregate6a/application.py +++ b/examples/aggregate6a/application.py @@ -3,12 +3,7 @@ from typing import TYPE_CHECKING, Any, ClassVar, Dict, Type from eventsourcing.application import Application, ProjectorFunction -from examples.aggregate6a.domainmodel import ( - Dog, - add_trick, - project_dog, - register_dog, -) +from examples.aggregate6a.domainmodel import Dog, add_trick, project_dog, register_dog if TYPE_CHECKING: # pragma: nocover from uuid import UUID diff --git a/examples/aggregate7/application.py b/examples/aggregate7/application.py index bd05e078..3f4ce25a 100644 --- a/examples/aggregate7/application.py +++ b/examples/aggregate7/application.py @@ -10,10 +10,7 @@ project_dog, register_dog, ) -from examples.aggregate7.persistence import ( - OrjsonTranscoder, - PydanticMapper, -) +from examples.aggregate7.persistence import OrjsonTranscoder, PydanticMapper if TYPE_CHECKING: # pragma: nocover from uuid import UUID diff --git a/examples/aggregate7a/application.py b/examples/aggregate7a/application.py index b757664d..51ff4964 100644 --- a/examples/aggregate7a/application.py +++ b/examples/aggregate7a/application.py @@ -3,10 +3,7 @@ from typing import TYPE_CHECKING, Any, ClassVar, Dict, Type from eventsourcing.application import Application, ProjectorFunction -from examples.aggregate7.persistence import ( - OrjsonTranscoder, - PydanticMapper, -) +from examples.aggregate7.persistence import OrjsonTranscoder, PydanticMapper from examples.aggregate7a.domainmodel import ( Dog, Snapshot, diff --git a/examples/aggregate8/application.py b/examples/aggregate8/application.py index 9aa4f8d6..ecd64cb6 100644 --- a/examples/aggregate8/application.py +++ b/examples/aggregate8/application.py @@ -4,10 +4,7 @@ from eventsourcing.application import Application from examples.aggregate8.domainmodel import Dog, Trick -from examples.aggregate8.persistence import ( - OrjsonTranscoder, - PydanticMapper, -) +from examples.aggregate8.persistence import OrjsonTranscoder, PydanticMapper if TYPE_CHECKING: # pragma: nocover from uuid import UUID diff --git a/examples/bankaccounts/test.py b/examples/bankaccounts/test.py index 97ebe150..cafb30bb 100644 --- a/examples/bankaccounts/test.py +++ b/examples/bankaccounts/test.py @@ -4,14 +4,8 @@ from decimal import Decimal from uuid import uuid4 -from examples.bankaccounts.application import ( - AccountNotFoundError, - BankAccounts, -) -from examples.bankaccounts.domainmodel import ( - AccountClosedError, - InsufficientFundsError, -) +from examples.bankaccounts.application import AccountNotFoundError, BankAccounts +from examples.bankaccounts.domainmodel import AccountClosedError, InsufficientFundsError class TestBankAccounts(unittest.TestCase): diff --git a/examples/cargoshipping/application.py b/examples/cargoshipping/application.py index 3d0516fd..4771168c 100644 --- a/examples/cargoshipping/application.py +++ b/examples/cargoshipping/application.py @@ -3,6 +3,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, cast from eventsourcing.application import Application +from eventsourcing.persistence import Transcoder, Transcoding from examples.cargoshipping.domainmodel import ( REGISTERED_ROUTES, Cargo, @@ -11,7 +12,6 @@ Leg, Location, ) -from eventsourcing.persistence import Transcoder, Transcoding if TYPE_CHECKING: # pragma: nocover from datetime import datetime diff --git a/examples/cargoshipping/test.py b/examples/cargoshipping/test.py index 75b75b60..aed8b226 100644 --- a/examples/cargoshipping/test.py +++ b/examples/cargoshipping/test.py @@ -5,10 +5,7 @@ from examples.cargoshipping.application import BookingApplication from examples.cargoshipping.domainmodel import Cargo -from examples.cargoshipping.interface import ( - BookingService, - select_preferred_itinerary, -) +from examples.cargoshipping.interface import BookingService, select_preferred_itinerary class TestBookingService(unittest.TestCase): diff --git a/examples/contentmanagement/test.py b/examples/contentmanagement/test.py index fa9298b2..89e1d0ba 100644 --- a/examples/contentmanagement/test.py +++ b/examples/contentmanagement/test.py @@ -4,17 +4,13 @@ from unittest import TestCase from uuid import uuid4 +from eventsourcing.system import NotificationLogReader from examples.contentmanagement.application import ( ContentManagementApplication, PageNotFoundError, SlugConflictError, ) -from examples.contentmanagement.domainmodel import ( - Index, - Page, - user_id_cvar, -) -from eventsourcing.system import NotificationLogReader +from examples.contentmanagement.domainmodel import Index, Page, user_id_cvar class TestContentManagement(TestCase): diff --git a/examples/contentmanagementsystem/application.py b/examples/contentmanagementsystem/application.py index 9bb2b0d9..6e41ffdb 100644 --- a/examples/contentmanagementsystem/application.py +++ b/examples/contentmanagementsystem/application.py @@ -2,12 +2,10 @@ from typing import TYPE_CHECKING, ClassVar, Dict, List, cast +from eventsourcing.system import ProcessApplication from examples.contentmanagement.domainmodel import Page from examples.contentmanagement.utils import apply_patch -from examples.searchablecontent.persistence import ( - SearchableContentRecorder, -) -from eventsourcing.system import ProcessApplication +from examples.searchablecontent.persistence import SearchableContentRecorder if TYPE_CHECKING: # pragma: nocover from uuid import UUID diff --git a/examples/contentmanagementsystem/postgres.py b/examples/contentmanagementsystem/postgres.py index 3edd85bf..7658d9b5 100644 --- a/examples/contentmanagementsystem/postgres.py +++ b/examples/contentmanagementsystem/postgres.py @@ -1,7 +1,5 @@ -from examples.searchablecontent.postgres import ( - PostgresSearchableContentRecorder, -) from eventsourcing.postgres import Factory, PostgresProcessRecorder +from examples.searchablecontent.postgres import PostgresSearchableContentRecorder class SearchableContentProcessRecorder( diff --git a/examples/contentmanagementsystem/sqlite.py b/examples/contentmanagementsystem/sqlite.py index b98717be..8ec413e7 100644 --- a/examples/contentmanagementsystem/sqlite.py +++ b/examples/contentmanagementsystem/sqlite.py @@ -1,7 +1,5 @@ -from examples.searchablecontent.sqlite import ( - SQLiteSearchableContentRecorder, -) from eventsourcing.sqlite import Factory, SQLiteProcessRecorder +from examples.searchablecontent.sqlite import SQLiteSearchableContentRecorder class SearchableContentProcessRecorder( diff --git a/examples/contentmanagementsystem/system.py b/examples/contentmanagementsystem/system.py index e96f8706..395b98f9 100644 --- a/examples/contentmanagementsystem/system.py +++ b/examples/contentmanagementsystem/system.py @@ -1,12 +1,8 @@ from __future__ import annotations -from examples.contentmanagement.application import ( - ContentManagementApplication, -) -from examples.contentmanagementsystem.application import ( - SearchIndexApplication, -) from eventsourcing.system import System +from examples.contentmanagement.application import ContentManagementApplication +from examples.contentmanagementsystem.application import SearchIndexApplication class ContentManagementSystem(System): diff --git a/examples/contentmanagementsystem/test_system.py b/examples/contentmanagementsystem/test_system.py index 186f780b..2e5b229e 100644 --- a/examples/contentmanagementsystem/test_system.py +++ b/examples/contentmanagementsystem/test_system.py @@ -4,19 +4,13 @@ from unittest import TestCase from uuid import uuid4 -from examples.contentmanagement.application import ( - ContentManagementApplication, -) -from examples.contentmanagement.domainmodel import user_id_cvar -from examples.contentmanagementsystem.application import ( - SearchIndexApplication, -) -from examples.contentmanagementsystem.system import ( - ContentManagementSystem, -) from eventsourcing.postgres import PostgresDatastore from eventsourcing.system import SingleThreadedRunner from eventsourcing.tests.postgres_utils import drop_postgres_table +from examples.contentmanagement.application import ContentManagementApplication +from examples.contentmanagement.domainmodel import user_id_cvar +from examples.contentmanagementsystem.application import SearchIndexApplication +from examples.contentmanagementsystem.system import ContentManagementSystem class ContentManagementSystemTestCase(TestCase): diff --git a/examples/searchablecontent/application.py b/examples/searchablecontent/application.py index 58de42b2..1b32222d 100644 --- a/examples/searchablecontent/application.py +++ b/examples/searchablecontent/application.py @@ -7,9 +7,7 @@ PageDetailsType, ) from examples.contentmanagement.domainmodel import Page -from examples.searchablecontent.persistence import ( - SearchableContentRecorder, -) +from examples.searchablecontent.persistence import SearchableContentRecorder if TYPE_CHECKING: # pragma: nocover from uuid import UUID diff --git a/examples/searchablecontent/postgres.py b/examples/searchablecontent/postgres.py index 3488ac07..048bd2f2 100644 --- a/examples/searchablecontent/postgres.py +++ b/examples/searchablecontent/postgres.py @@ -2,15 +2,13 @@ from typing import TYPE_CHECKING, Any, List, Sequence, Tuple -from examples.contentmanagement.application import PageNotFoundError -from examples.searchablecontent.persistence import ( - SearchableContentRecorder, -) from eventsourcing.postgres import ( Factory, PostgresAggregateRecorder, PostgresApplicationRecorder, ) +from examples.contentmanagement.application import PageNotFoundError +from examples.searchablecontent.persistence import SearchableContentRecorder if TYPE_CHECKING: # pragma: nocover from uuid import UUID diff --git a/examples/searchablecontent/sqlite.py b/examples/searchablecontent/sqlite.py index ebf1fb0d..e44a4e5b 100644 --- a/examples/searchablecontent/sqlite.py +++ b/examples/searchablecontent/sqlite.py @@ -3,16 +3,14 @@ from typing import TYPE_CHECKING, Any, List, Sequence, Tuple from uuid import UUID -from examples.contentmanagement.application import PageNotFoundError -from examples.searchablecontent.persistence import ( - SearchableContentRecorder, -) from eventsourcing.sqlite import ( Factory, SQLiteAggregateRecorder, SQLiteApplicationRecorder, SQLiteCursor, ) +from examples.contentmanagement.application import PageNotFoundError +from examples.searchablecontent.persistence import SearchableContentRecorder if TYPE_CHECKING: # pragma: nocover from eventsourcing.persistence import StoredEvent diff --git a/examples/searchablecontent/test_application.py b/examples/searchablecontent/test_application.py index 7b5bf4e2..b52928f3 100644 --- a/examples/searchablecontent/test_application.py +++ b/examples/searchablecontent/test_application.py @@ -5,12 +5,10 @@ from unittest import TestCase from uuid import uuid4 -from examples.contentmanagement.domainmodel import user_id_cvar -from examples.searchablecontent.application import ( - SearchableContentApplication, -) from eventsourcing.postgres import PostgresDatastore from eventsourcing.tests.postgres_utils import drop_postgres_table +from examples.contentmanagement.domainmodel import user_id_cvar +from examples.searchablecontent.application import SearchableContentApplication class SearchableContentApplicationTestCase(TestCase): diff --git a/examples/searchablecontent/test_recorder.py b/examples/searchablecontent/test_recorder.py index 724d247e..cf366e0c 100644 --- a/examples/searchablecontent/test_recorder.py +++ b/examples/searchablecontent/test_recorder.py @@ -5,15 +5,11 @@ from unittest import TestCase from uuid import uuid4 -from examples.contentmanagement.application import PageNotFoundError -from examples.searchablecontent.application import ( - SearchableContentApplication, -) -from examples.searchablecontent.persistence import ( - SearchableContentRecorder, -) from eventsourcing.postgres import PostgresDatastore from eventsourcing.tests.postgres_utils import drop_postgres_table +from examples.contentmanagement.application import PageNotFoundError +from examples.searchablecontent.application import SearchableContentApplication +from examples.searchablecontent.persistence import SearchableContentRecorder class SearchableContentRecorderTestCase(TestCase): diff --git a/examples/searchabletimestamps/application.py b/examples/searchabletimestamps/application.py index 0ff69373..b8dc4b58 100644 --- a/examples/searchabletimestamps/application.py +++ b/examples/searchabletimestamps/application.py @@ -4,9 +4,7 @@ from examples.cargoshipping.application import BookingApplication from examples.cargoshipping.domainmodel import Cargo -from examples.searchabletimestamps.persistence import ( - SearchableTimestampsRecorder, -) +from examples.searchabletimestamps.persistence import SearchableTimestampsRecorder if TYPE_CHECKING: # pragma: nocover from datetime import datetime diff --git a/examples/searchabletimestamps/postgres.py b/examples/searchabletimestamps/postgres.py index daae09f8..3b568448 100644 --- a/examples/searchabletimestamps/postgres.py +++ b/examples/searchabletimestamps/postgres.py @@ -5,14 +5,12 @@ from uuid import UUID from eventsourcing.domain import Aggregate -from examples.searchabletimestamps.persistence import ( - SearchableTimestampsRecorder, -) from eventsourcing.postgres import ( Factory, PostgresApplicationRecorder, PostgresDatastore, ) +from examples.searchabletimestamps.persistence import SearchableTimestampsRecorder if TYPE_CHECKING: # pragma: nocover from psycopg import Cursor diff --git a/examples/searchabletimestamps/sqlite.py b/examples/searchabletimestamps/sqlite.py index b66ad495..52d543ba 100644 --- a/examples/searchabletimestamps/sqlite.py +++ b/examples/searchabletimestamps/sqlite.py @@ -5,15 +5,13 @@ from uuid import UUID from eventsourcing.domain import Aggregate -from examples.searchabletimestamps.persistence import ( - SearchableTimestampsRecorder, -) from eventsourcing.sqlite import ( Factory, SQLiteApplicationRecorder, SQLiteCursor, SQLiteDatastore, ) +from examples.searchabletimestamps.persistence import SearchableTimestampsRecorder if TYPE_CHECKING: # pragma: nocover from eventsourcing.persistence import ApplicationRecorder, StoredEvent diff --git a/examples/searchabletimestamps/test_searchabletimestamps.py b/examples/searchabletimestamps/test_searchabletimestamps.py index 8d70e1da..10913713 100644 --- a/examples/searchabletimestamps/test_searchabletimestamps.py +++ b/examples/searchabletimestamps/test_searchabletimestamps.py @@ -8,12 +8,10 @@ from eventsourcing.application import AggregateNotFoundError from eventsourcing.domain import create_utc_datetime_now -from examples.cargoshipping.domainmodel import Location -from examples.searchabletimestamps.application import ( - SearchableTimestampsApplication, -) from eventsourcing.postgres import PostgresDatastore from eventsourcing.tests.postgres_utils import drop_postgres_table +from examples.cargoshipping.domainmodel import Location +from examples.searchabletimestamps.application import SearchableTimestampsApplication class SearchableTimestampsTestCase(TestCase): diff --git a/mypy.ini b/mypy.ini index b5e4b5ba..66438f64 100644 --- a/mypy.ini +++ b/mypy.ini @@ -13,9 +13,12 @@ no_implicit_optional = True disallow_untyped_defs = True disallow_any_generics = True +[mypy-eventsourcing.dispatch] +ignore_errors = True + [mypy-eventsourcing.tests.*] ignore_errors = True -[mypy-eventsourcing.dispatch] +[mypy-tests.*] ignore_errors = True