Skip to content

Commit

Permalink
remove Callable type
Browse files Browse the repository at this point in the history
  • Loading branch information
cloutierMat committed Oct 4, 2024
1 parent bd18d5a commit 803aa06
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions moto/utilities/id_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@

from moto.moto_api._internal import mock_random

IdSource = Callable[[str, str, str, str, str], str | None]


class MotoIdManager:
"""class to manage custom ids. Do not create instance and instead
use the `id_manager` instance created below."""

_custom_ids: dict[str, str]
_id_sources: List[IdSource]
_custom_ids: Dict[str, str]
_id_sources: List[Callable[[str, str, str, str, str], Union[str, None]]]

_lock: threading.RLock

Expand Down Expand Up @@ -54,7 +52,9 @@ def unset_custom_id(
".".join([account_id, region, service, resource, name]), None
)

def add_id_source(self, id_source: IdSource) -> None:
def add_id_source(
self, id_source: Callable[[str, str, str, str, str], Union[str, None]]
) -> None:
self._id_sources.append(id_source)

def find_id_from_sources(
Expand Down

0 comments on commit 803aa06

Please sign in to comment.