Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WithProtocols marker #276

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

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
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