Skip to content

Commit

Permalink
mypy ignore await method
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusconjeaud committed Dec 13, 2024
1 parent 3c1e043 commit 316a9fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions neomodel/async_/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ def __init__(self, source: Any) -> None:
self._intermediate_transforms: list = []

def __await__(self) -> Any:
return self.all().__await__()
return self.all().__await__() # type: ignore[attr-defined]

async def _get(
self, limit: TOptional[int] = None, lazy: bool = False, **kwargs: dict[str, Any]
Expand Down Expand Up @@ -1696,7 +1696,7 @@ class AsyncTraversal(AsyncBaseSet):
filters: list

def __await__(self) -> Any:
return self.all().__await__()
return self.all().__await__() # type: ignore[attr-defined]

def __init__(self, source: Any, name: str, definition: dict) -> None:
"""
Expand Down
2 changes: 1 addition & 1 deletion neomodel/async_/relationship_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __str__(self) -> str:
return f"{self.description} in {direction} direction of type {self.definition['relation_type']} on node ({self.source.element_id}) of class '{self.source_class.__name__}'"

def __await__(self) -> Any:
return self.all().__await__()
return self.all().__await__() # type: ignore[attr-defined]

def _check_node(self, obj: type["AsyncStructuredNode"]) -> None:
"""check for valid node i.e correct class and is saved"""
Expand Down
4 changes: 2 additions & 2 deletions neomodel/sync_/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ def __init__(self, source: Any) -> None:
self._intermediate_transforms: list = []

def __await__(self) -> Any:
return self.all().__await__()
return self.all().__await__() # type: ignore[attr-defined]

def _get(
self, limit: TOptional[int] = None, lazy: bool = False, **kwargs: dict[str, Any]
Expand Down Expand Up @@ -1690,7 +1690,7 @@ class Traversal(BaseSet):
filters: list

def __await__(self) -> Any:
return self.all().__await__()
return self.all().__await__() # type: ignore[attr-defined]

def __init__(self, source: Any, name: str, definition: dict) -> None:
"""
Expand Down
2 changes: 1 addition & 1 deletion neomodel/sync_/relationship_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __str__(self) -> str:
return f"{self.description} in {direction} direction of type {self.definition['relation_type']} on node ({self.source.element_id}) of class '{self.source_class.__name__}'"

def __await__(self) -> Any:
return self.all().__await__()
return self.all().__await__() # type: ignore[attr-defined]

def _check_node(self, obj: type["StructuredNode"]) -> None:
"""check for valid node i.e correct class and is saved"""
Expand Down

0 comments on commit 316a9fd

Please sign in to comment.