Skip to content

Commit

Permalink
Fixed fmt and lint Makefile commands, and reformatted.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbywater committed Nov 7, 2024
1 parent d77403e commit 242f9c2
Show file tree
Hide file tree
Showing 24 changed files with 40 additions and 104 deletions.
6 changes: 1 addition & 5 deletions examples/aggregate6/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions examples/aggregate6a/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions examples/aggregate7/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions examples/aggregate7a/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions examples/aggregate8/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 2 additions & 8 deletions examples/bankaccounts/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion examples/cargoshipping/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -11,7 +12,6 @@
Leg,
Location,
)
from eventsourcing.persistence import Transcoder, Transcoding

if TYPE_CHECKING: # pragma: nocover
from datetime import datetime
Expand Down
5 changes: 1 addition & 4 deletions examples/cargoshipping/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 2 additions & 6 deletions examples/contentmanagement/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 2 additions & 4 deletions examples/contentmanagementsystem/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions examples/contentmanagementsystem/postgres.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from examples.searchablecontent.postgres import (
PostgresSearchableContentRecorder,
)
from eventsourcing.postgres import Factory, PostgresProcessRecorder
from examples.searchablecontent.postgres import PostgresSearchableContentRecorder


class SearchableContentProcessRecorder(
Expand Down
4 changes: 1 addition & 3 deletions examples/contentmanagementsystem/sqlite.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from examples.searchablecontent.sqlite import (
SQLiteSearchableContentRecorder,
)
from eventsourcing.sqlite import Factory, SQLiteProcessRecorder
from examples.searchablecontent.sqlite import SQLiteSearchableContentRecorder


class SearchableContentProcessRecorder(
Expand Down
8 changes: 2 additions & 6 deletions examples/contentmanagementsystem/system.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
14 changes: 4 additions & 10 deletions examples/contentmanagementsystem/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 1 addition & 3 deletions examples/searchablecontent/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions examples/searchablecontent/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions examples/searchablecontent/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions examples/searchablecontent/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
10 changes: 3 additions & 7 deletions examples/searchablecontent/test_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 1 addition & 3 deletions examples/searchabletimestamps/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions examples/searchabletimestamps/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions examples/searchabletimestamps/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions examples/searchabletimestamps/test_searchabletimestamps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 4 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 242f9c2

Please sign in to comment.