Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalp committed Oct 7, 2024
1 parent 6de609c commit 55c77ba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion example/queries/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from ariadne_graphql_modules import GraphQLObject
from graphql import GraphQLResolveInfo

from ..database import db
from ..scalars.date import DateScalar
from ..scalars.datetime import DateTimeScalar

Expand Down
2 changes: 1 addition & 1 deletion example/scalars/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ def serialize(cls, value: Union["DateScalar", date]) -> str:

@classmethod
def parse_value(cls, value: str) -> date:
return datetime.strptime("%Y-%m-%d").date()
return datetime.strptime(value, "%Y-%m-%d").date()
2 changes: 2 additions & 0 deletions example/subscriptions/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class Subscription(GraphQLSubscription):
event: EventType

@GraphQLSubscription.source("event")
@staticmethod
async def source_event(obj, info: GraphQLResolveInfo) -> AsyncGenerator[int, None]:
i = 0

Expand All @@ -22,5 +23,6 @@ async def source_event(obj, info: GraphQLResolveInfo) -> AsyncGenerator[int, Non
await sleep(float(random.randint(1, 50)) / 10)

@GraphQLSubscription.resolver("event")
@staticmethod
async def resolve_event(obj: int, info: GraphQLResolveInfo) -> dict:
return {"id": obj, "payload": datetime.now()}

0 comments on commit 55c77ba

Please sign in to comment.