Skip to content

Commit

Permalink
Fix pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
pnwpedro committed Apr 1, 2024
1 parent c44939e commit e651fa3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fauna/http/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def stream(
url: str,
headers: Mapping[str, str],
data: Mapping[str, Any],
) -> HTTPResponse:
) -> Iterator[Any]:
pass

@abc.abstractmethod
Expand Down
4 changes: 2 additions & 2 deletions fauna/query/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __eq__(self, other):
other, Page) and self.data == other.data and self.after == other.after

def __hash__(self):
hash((type(self), self.data, self.after))
return hash((type(self), self.data, self.after))

def __ne__(self, other):
return not self.__eq__(other)
Expand All @@ -56,7 +56,7 @@ def __eq__(self, other):
return isinstance(other, Module) and str(self) == str(other)

def __hash__(self):
hash(self.name)
return hash(self.name)


class BaseReference:
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_client_with_query_limits.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from multiprocessing.pool import ThreadPool
import os
from typing import Optional

import pytest

Expand All @@ -9,7 +10,7 @@
from fauna.errors.errors import ThrottlingError


def query_collection(client: Client) -> QuerySuccess:
def query_collection(client: Client) -> Optional[QuerySuccess]:
coll_name = os.environ.get("QUERY_LIMITS_COLL") or ""
try:
return client.query(fql("${coll}.all().paginate(50)", coll=fql(coll_name)))
Expand Down

0 comments on commit e651fa3

Please sign in to comment.