Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy #4

Merged
merged 9 commits into from
Jan 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
all
MeshanKhosla committed Jan 10, 2024
commit f46e2a84042220cefb930c22a69379c851075929
4 changes: 2 additions & 2 deletions upstash_qstash/asyncio/events.py
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@ async def get(
"""
Asynchronously retrieve logs.
"""
query: Dict[str, int] = {}
query = {}
if req is not None and req.get("cursor") is not None and req["cursor"] > 0:
query["cursor"] = req["cursor"]
query["cursor"] = str(req["cursor"])

return await http.request_async(
{
6 changes: 3 additions & 3 deletions upstash_qstash/events.py
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ class State(Enum):
EventsRequest = TypedDict(
"EventsRequest",
{
"cursor": str,
"cursor": int,
},
)

@@ -48,9 +48,9 @@ def get(http: HttpClient, req: Optional[EventsRequest] = None) -> GetEventsRespo
"""
Retrieve logs.
"""
query: Dict[str, int] = {}
query = {}
if req is not None and req.get("cursor") is not None and req["cursor"] > 0:
query["cursor"] = req["cursor"]
query["cursor"] = str(req["cursor"])

return http.request(
{