lagom icon indicating copy to clipboard operation
lagom copied to clipboard

Lagom doesn't seemt to recognize default values during injection

Open ShravanSunder opened this issue 7 months ago • 0 comments

class PromptTemplateRepo(BaseRepo):
  def __init__(self, *, sa_service: SaService | None = None, should_auto_commit: bool = False):
    super().__init__(sa_service=sa_service, should_auto_commit=should_auto_commit)
repo = agent_store_container()[PromptTemplateRepo]

UnresolvableType: Unable to construct dependency of type PromptTemplateRepo The constructor probably has some unresolvable dependencies: PromptTemplateRepo => bool => bool

I would have expected it to take into account default values during injection. @meadsteve any thoughts on if i should restructure my class or is this a bug with lagom?

ShravanSunder avatar Jul 05 '24 12:07 ShravanSunder