Skip to content

Commit 92e16de

Browse files
committed
fix: linting
1 parent 49a725d commit 92e16de

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

eventsourcingdb/handlers/read_event_types/event_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from dataclasses import dataclass
2-
from typing import TypeVar, Dict, Any, Union
2+
from typing import TypeVar, Any
33

44
from ...errors.validation_error import ValidationError
55

@@ -10,7 +10,7 @@
1010
class EventType:
1111
event_type: str
1212
is_phantom: bool
13-
schema: Union[str, Dict[str, Any], None] = None
13+
schema: str | dict[str, Any] | None = None
1414

1515
@staticmethod
1616
def parse(unknown_object: dict) -> Self:

eventsourcingdb/handlers/read_event_types/read_event_types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from collections.abc import AsyncGenerator
22
from http import HTTPStatus
3-
import json
43

54
from .event_type import EventType
65
from .is_event_type import is_event_type

eventsourcingdb/handlers/register_event_schema/register_event_schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import json
22
from http import HTTPStatus
3-
from typing import Union, Dict, Any
3+
from typing import Any
44

55
from ...abstract_base_client import AbstractBaseClient
66
from ...errors.custom_error import CustomError
@@ -15,7 +15,7 @@
1515
async def register_event_schema(
1616
client: AbstractBaseClient,
1717
event_type: str,
18-
json_schema: Union[str, Dict[str, Any]],
18+
json_schema: str | dict[str, Any],
1919
) -> None:
2020
try:
2121
validate_type(event_type)
@@ -25,7 +25,7 @@ async def register_event_schema(
2525
) from validation_error
2626
except Exception as other_error:
2727
raise InternalError(str(other_error)) from other_error
28-
28+
2929
# Handle both string and dictionary schema formats
3030
# If json_schema is a string, parse it to ensure it's valid JSON
3131
# If it's already a dict, use it directly

0 commit comments

Comments
 (0)