Skip to content

Docs/grammar fix providers-singleton, issue #917 #918

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions docs/providers/singleton.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ factories:
- :ref:`factory-specialize-provided-type`
- :ref:`abstract-factory`

``Singleton`` provider scope is tied to the container. Two different containers will provider
two different singleton objects:
Since ``Singleton`` scope is container-specific, each container will create and manage its own ``Singleton`` instance.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure this has the same meaning as before now. Since usage assumes we previously mentioned scope in relation to container. Which we did not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought i would add some clarity but if the meaning has totally shifted, then i will stick with just fixing the typo on the previous sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So should i just make a pull request with the grammer correction for now ?

Copy link
Contributor

Choose a reason for hiding this comment

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

You can do it within this PR, I believe.

Therefore, two containers will provide two distinct ``Singleton`` objects.

.. literalinclude:: ../../examples/providers/singleton_multiple_containers.py
:language: python
Expand Down