Skip to content

Commit

Permalink
Merge pull request #19 from ikalnytskyi/docstring-styles
Browse files Browse the repository at this point in the history
Small enhancements in docstrings for API reference
  • Loading branch information
ikalnytskyi authored Mar 18, 2018
2 parents f9508a1 + b615928 commit c913b9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/picobox/_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def pass_(self, key, as_=_missing):
:param key: A key to retrieve a dependency. Must be the one used when
calling :meth:`.put` method.
:parameter as\_: (optional) Bind a dependency associated with `key` to
:param as\_: (optional) Bind a dependency associated with `key` to
a function argument named `as_`. If not passed, the same as `key`.
:raises KeyError: If no dependencies saved under `key` in the box.
"""
Expand Down
16 changes: 3 additions & 13 deletions src/picobox/_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,13 @@ def do(magic):
As a regular function::
import picobox
@picobox.pass_('magic')
def do(magic):
return magic + 1
foobox = picobox.Box()
foobox.put('magic', 42)
barbox = picobox.Box()
barbox.put('magic', 13)
picobox.push(foobox)
assert do() == 43
picobox.push(barbox)
assert do() == 14
picobox.pop()
assert do() == 43
picobox.pop()
:param box: A :class:`Box` instance to push to the top of the stack.
Expand Down

0 comments on commit c913b9f

Please sign in to comment.