Skip to content

Conversation

@IvanKirpichnikov
Copy link
Member

No description provided.


def test_get_by_not_protocol() -> None:
provider = Provider(scope=Scope.APP)
provider.provide(C, provides=WithProtocols[C])
Copy link
Member

Choose a reason for hiding this comment

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

We need either another naming or another logic.
For WithParents we provide class itself together with parents. The same is expected here if we keep the prefix With

@Tishka17
Copy link
Member

We need more tests to ensure that:

  • non-protocol parents are not provided
  • Protocol it self is not provided

Probably, we check most (but not all) of things by testing get_parents_protocols

@Tishka17
Copy link
Member

Let's keep this open for a while, but do not merge.
Instead we should think about giving more unified helpers for a user.

@Tishka17 Tishka17 added the to clarify Needs information or coordination with other issues label Oct 21, 2024
@Tishka17 Tishka17 moved this to Backlog in Dishka kanban Apr 13, 2025
@Tishka17 Tishka17 removed this from Dishka kanban Apr 13, 2025
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