Skip to content

Commit 5cc8456

Browse files
committed
-
1 parent 4d59410 commit 5cc8456

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

python_toolbox/context_managers/base_classes/decorating_context_manager.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@
1414

1515
class DecoratingContextManager(object):
1616
'''
17-
blocktododoc
17+
Context manager that can decorate a function to use it.
18+
19+
Example:
20+
21+
my_context_manager = DecoratingContextManager()
22+
23+
@my_context_manager
24+
def f():
25+
pass # Anything that happens here is surrounded by the
26+
# equivalent of `my_context_manager`.
27+
1828
'''
1929

2030
def __call__(self, function):

python_toolbox/context_managers/reentrant_context_manager.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
from python_toolbox.proxy_property import ProxyProperty
1414

1515
from .context_manager import ContextManager
16-
# blocktodo: need tests on whether `depth` is increased before or after
17-
# `reentrant_enter` and `reentrant_exit`. Was relevant in freezers.
16+
1817

1918
class ReentrantContextManager(ContextManager):
2019
'''

python_toolbox/import_tools.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def normal_import(module_name):
7474
return __import__(module_name)
7575

7676

77-
@caching.cache() # todo: clear cache if sys.path changes
77+
@caching.cache() # todo: clear cache if `sys.path` changes
7878
def import_if_exists(module_name, silent_fail=False):
7979
'''
8080
Import module by name and return it, only if it exists.
@@ -106,11 +106,6 @@ def import_if_exists(module_name, silent_fail=False):
106106
else: # silent_fail is False
107107
raise ImportError("Can't find %s." % module_name)
108108

109-
# blocktododoc Not actually using the result of `imp.find_module`, just
110-
# want to know that it worked and the module exists. We'll let
111-
# `normal_import` find the module again, assuming its finding procedure
112-
# will work exactly the same as `imp`'s.
113-
114109
return normal_import(module_name)
115110

116111

python_toolbox/module_tasting/module_tasting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# This program is distributed under the LGPL2.1 license.
33

44
'''
5-
This module defines the `taste_module` class.
5+
This module defines the `taste_module` function.
66
77
See its documentation for more information.
88
'''
99

10-
# blocktodo: Will need thread safety for when another thread is importing at
10+
# todo: Will need thread safety for when another thread is importing at
1111
# the same time. probably make context manager for import lock from imp.
1212

1313
from __future__ import with_statement

python_toolbox/wx_tools/keyboard/key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import wx
1111

1212

13-
class Key(object): #blocktodo: __repr__
13+
class Key(object):
1414
'''A key combination.'''
1515

1616
def __init__(self, key_code, cmd=False, alt=False, shift=False):

0 commit comments

Comments
 (0)