Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions fastapi_startkit/src/fastapi_startkit/container/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ def __init__(self):
self.swaps = {}
self._remembered = {}

def bind(self, name: str, class_obj: Any) -> None:
def bind(self, name: str | type, class_obj: Any) -> None:
"""Bind classes into the container with a key value pair.

Arguments:
name {string} -- Name of the key you want to bind the object to
name {string | type} -- Key to bind the object to; a class object is
accepted for class-keyed bindings (mirrors make()'s class-key support)
class_obj {object} -- The object you want to bind
"""
if inspect.ismodule(class_obj):
Expand Down
Loading