diff --git a/README.md b/README.md index 24fc660..4c24c3e 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ A `@decorator` 'talks about' other code in a way that is understandable for b ### Example ``` python -from ornaments.invariants.only_called_once import only_called_once +from ornaments.invariants import only_called_once @only_called_once(scope="session", enforce=True) def only_once_callable_function() -> None: diff --git a/src/ornaments/invariants/__init__.py b/src/ornaments/invariants/__init__.py index e69de29..2d5b3d4 100644 --- a/src/ornaments/invariants/__init__.py +++ b/src/ornaments/invariants/__init__.py @@ -0,0 +1,5 @@ +from .only_called_once import only_called_once + +__all__ = [ + "only_called_once", +] diff --git a/tests/invariants/test_only_called_once.py b/tests/invariants/test_only_called_once.py index 850c502..038a9df 100644 --- a/tests/invariants/test_only_called_once.py +++ b/tests/invariants/test_only_called_once.py @@ -1,6 +1,6 @@ import pytest from ornaments.exceptions import CalledTooOftenError, CalledTooOftenWarning -from ornaments.invariants.only_called_once import only_called_once +from ornaments.invariants import only_called_once # --------------------------------------------------------------- # enforce=False (default)