diff --git a/fauna/http/http_client.py b/fauna/http/http_client.py index d4b0e10b..205525f4 100644 --- a/fauna/http/http_client.py +++ b/fauna/http/http_client.py @@ -67,7 +67,7 @@ def stream( url: str, headers: Mapping[str, str], data: Mapping[str, Any], - ) -> HTTPResponse: + ) -> Iterator[Any]: pass @abc.abstractmethod diff --git a/fauna/query/models.py b/fauna/query/models.py index bfc99852..bca1a2a4 100644 --- a/fauna/query/models.py +++ b/fauna/query/models.py @@ -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) @@ -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: diff --git a/tests/integration/test_client_with_query_limits.py b/tests/integration/test_client_with_query_limits.py index f5ce09d8..0d95948a 100644 --- a/tests/integration/test_client_with_query_limits.py +++ b/tests/integration/test_client_with_query_limits.py @@ -1,5 +1,6 @@ from multiprocessing.pool import ThreadPool import os +from typing import Optional import pytest @@ -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)))