Skip to content

Commit ef32fd6

Browse files
committed
-
1 parent 37dcf5b commit ef32fd6

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

source_py3/python_toolbox/context_management/abstract_context_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from python_toolbox import decorator_tools
99

10-
from .base_classes.decorating_context_manager import DecoratingContextManager
10+
from .base_classes.decorating_context_manager import _DecoratingContextManagerMixin
1111
from .context_manager_type import ContextManagerType
1212
from .self_hook import SelfHook
1313

source_py3/python_toolbox/context_management/base_classes/decorating_context_manager.py renamed to source_py3/python_toolbox/context_management/base_classes/decorating_context_manager_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from python_toolbox import decorator_tools
55

66

7-
class DecoratingContextManager:
7+
class _DecoratingContextManagerMixin:
88
'''
99
Context manager that can decorate a function to use it.
1010

source_py3/python_toolbox/context_management/base_classes/__init__.py renamed to source_py3/python_toolbox/context_management/base_classes/mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
'''Defines base classes for `ContextManager`.'''
55

66

7-
from .decorating_context_manager import DecoratingContextManager
7+
from .decorating_context_manager import _DecoratingContextManagerMixin

source_py3/python_toolbox/context_management/context_manager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
from python_toolbox import decorator_tools
99

1010
from .abstract_context_manager import AbstractContextManager
11-
from .base_classes.decorating_context_manager import DecoratingContextManager
11+
from .mixins.decorating_context_manager_mixin import \
12+
_DecoratingContextManagerMixin
1213
from .context_manager_type import ContextManagerType
1314
from .self_hook import SelfHook
1415

1516

16-
class ContextManager(AbstractContextManager, DecoratingContextManager,
17+
class ContextManager(AbstractContextManager, _DecoratingContextManagerMixin,
1718
metaclass=ContextManagerType):
1819
'''
1920
Allows running preparation code before a given suite and cleanup after.

source_py3/python_toolbox/context_management/modifiers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ def __exit__(self, exc_type, exc_value, exc_traceback):
5858
def Meow():
5959
yield # ...
6060
61-
blocktodo: add tests for decorating ContextManager class and
62-
@ContextManagerType generator.
6361
'''
6462
return _IdempotentContextManager._wrap_context_manager_or_class(
6563
context_manager,

0 commit comments

Comments
 (0)