Skip to content

Commit

Permalink
improve typing
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee committed Oct 11, 2023
1 parent da4e732 commit 2e068f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqladmin/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def get_primary_key(model: type) -> Column:
return pks[0]


def get_primary_keys(model: type) -> Tuple[Column, ...]:
def get_primary_keys(model: Any) -> Tuple[Column, ...]:
return tuple(inspect(model).mapper.primary_key)


Expand Down Expand Up @@ -226,7 +226,7 @@ def _object_identifier_parts(id_string: str, model: type) -> Tuple[str, ...]:
return tuple(v.replace(r"\;", ";").replace(r"\\", "\\") for v in values)


def object_identifier_values(id_string: str, model: type) -> tuple:
def object_identifier_values(id_string: str, model: Any) -> tuple:
values = []
pks = get_primary_keys(model)
for pk, part in zip(pks, _object_identifier_parts(id_string, model)):
Expand Down

0 comments on commit 2e068f7

Please sign in to comment.