Skip to content

Commit

Permalink
Update async directory client to match sync
Browse files Browse the repository at this point in the history
  • Loading branch information
ronenh committed Nov 5, 2024
1 parent 74fbf0b commit 910d768
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/aserto/client/directory/v3/aio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,38 +405,41 @@ async def get_relations(
@typing.overload
async def get_relation(
self,
*,
with_objects: typing.Literal[False] = False,
object_type: str = "",
object_id: str = "",
relation: str = "",
subject_type: str = "",
subject_id: str = "",
subject_relation: str = "",
with_objects: typing.Literal[False] = False,
) -> Relation:
...

@typing.overload
async def get_relation(
self,
*,
with_objects: typing.Literal[True],
object_type: str = "",
object_id: str = "",
relation: str = "",
subject_type: str = "",
subject_id: str = "",
subject_relation: str = "",
with_objects: typing.Literal[True] = True,
) -> RelationResponse:
...

async def get_relation(
self,
*,
with_objects: bool = False,
object_type: str = "",
object_id: str = "",
relation: str = "",
subject_type: str = "",
subject_id: str = "",
subject_relation: str = "",
with_objects: bool = False,
) -> typing.Union[Relation, RelationResponse]:
"""Retrieve a directory relation that matches the specified filters.
Raises a NotFoundError no matching relation is found.
Expand Down

0 comments on commit 910d768

Please sign in to comment.