Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Commit

Permalink
Update Injector docstring WRT provide_self change.
Browse files Browse the repository at this point in the history
  • Loading branch information
groner committed Jan 13, 2016
1 parent 5e46c7d commit d390012
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,11 @@ The injector lifecycle can also be managed asynchronously using the
...
injector.exit()

By default, the injector does not provide itself, but will when asked::
The injector provides itself as the `'injector'` service::

with Injector(provide_self=True) as injector:
with Injector() as injector:
injector.get('injector')

Annotate with note 'injector' to inject the injector.


``Injector.sub(cls, *mixins_and_dicts, **values)``
--------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions jeni.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,10 @@ class Injector(BaseInjector):
...
injector.exit()
By default, the injector does not provide itself, but will when asked::
The injector provides itself as the `'injector'` service::
with Injector(provide_self=True) as injector:
with Injector() as injector:
injector.get('injector')
Annotate with note 'injector' to inject the injector.
"""

self.annotator = self.annotator_class()
Expand Down

0 comments on commit d390012

Please sign in to comment.