Skip to content

Conversation

@la5tway
Copy link

@la5tway la5tway commented Mar 27, 2024

No description provided.

@la5tway la5tway closed this Mar 27, 2024
@la5tway la5tway reopened this Mar 27, 2024
@overload
def resolve_all(self, components: None = None) -> None: ...
@overload
def resolve_all(self, components: Literal[True]) -> None: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of that?

@overload
def resolve_all(self, components: Iterable[Component]) -> None: ...

def resolve_all(self, components: Any = None) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need specify components? What's the use case?

"""
if not components:

def component_check(k: DependencyKey) -> bool:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of nested functions

return k.component in components

for key in filter(component_check, self.registry.factories):
with suppress(NoContextValueError):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

@overload
def resolve_all(self, components: Iterable[Component]) -> None: ...

def resolve_all(self, components: Any = None) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to call parent container method as well?

@Tishka17 Tishka17 added the to clarify Needs information or coordination with other issues label Oct 21, 2024
@Tishka17
Copy link
Member

It is not yet clear what we are planning to achive. I'm keeping this PR open so we could return when implementing #198 or something related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

to clarify Needs information or coordination with other issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants