Skip to content

Commit

Permalink
chore: export invariant decorators on module level
Browse files Browse the repository at this point in the history
  • Loading branch information
MultifokalHirn committed Dec 21, 2023
1 parent 5d3af3a commit 5ff62ac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ A `@decorator` 'talks about' other code in a way that is <u>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:
Expand Down
5 changes: 5 additions & 0 deletions src/ornaments/invariants/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from .only_called_once import only_called_once

__all__ = [
"only_called_once",
]
2 changes: 1 addition & 1 deletion tests/invariants/test_only_called_once.py
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 5ff62ac

Please sign in to comment.