Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions i2/signatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,12 +696,12 @@ def extract_arguments(

If you're expecting no remainder you might want to just get the args and kwargs (
not this third
expected-to-be-empty remainder). You have two ways to do that, specifying::
expected-to-be-empty remainder). You have two ways to do that, specifying:

`what_to_do_with_remainding='ignore'`, which will just return the (args,
kwargs) pair
`what_to_do_with_remainding='assert_empty'`, which will do the same, but first
assert the remainder is empty
- `what_to_do_with_remainding='ignore'`, which will just return the (args,
kwargs) pair
- `what_to_do_with_remainding='assert_empty'`, which will do the same, but first
assert the remainder is empty

We suggest to use `functools.partial` to configure the `argument_argument` you need.

Expand Down
6 changes: 3 additions & 3 deletions i2/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class ConditionalExceptionCatcher:
:param prevent_propagation: Whether to prevent the exception from propagating. Defaults
to ``True``.

.. rubric:: Example
**Example**

>>> exception_catcher = ConditionalExceptionCatcher(
... ValueError, lambda e: e.args[0] == 'foo', handlers=print
Expand Down Expand Up @@ -285,7 +285,7 @@ class AttributeMapping(SimpleNamespace, Mapping[str, Any]):

Useful when you want mapping interface but don't need mutation.

.. rubric:: Examples
**Examples**

>>> ns = AttributeMapping(x=10, y=20)
>>> ns.x
Expand Down Expand Up @@ -326,7 +326,7 @@ class AttributeMutableMapping(AttributeMapping, MutableMapping[str, Any]):
Extends AttributeMapping with mutation capabilities,
ensuring proper error handling and protocol compliance.

.. rubric:: Examples
**Examples**

>>> ns = AttributeMutableMapping(apple=1, banana=2)
>>> ns.apple
Expand Down
Loading