summaryrefslogtreecommitdiff
path: root/xnt/__init__.py
diff options
context:
space:
mode:
authorkennyballou <kballou@onyx.boisestate.edu>2012-10-24 16:06:09 -0600
committerkballou <kballou@onyx.boisestate.edu>2012-10-24 16:06:09 -0600
commit37531a7c2fb357d92afaea327d6a4d1cc69a4fd1 (patch)
tree22d7b12b00f6728aa889c837fd4e85102b79d58c /xnt/__init__.py
parent823b5b1bf0db8d9a269280b0c5a8ad1e0efae8fc (diff)
downloadxnt-37531a7c2fb357d92afaea327d6a4d1cc69a4fd1.tar.gz
xnt-37531a7c2fb357d92afaea327d6a4d1cc69a4fd1.tar.xz
Add printing of doc string to ``help`` target
Updated ``target`` decorator to forward the doc-string of the decorated method to the returned wrapper method. xnt.xenant, when printing targets, can access the forwarded doc-string and print it as a description of the target
Diffstat (limited to 'xnt/__init__.py')
-rw-r--r--xnt/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/xnt/__init__.py b/xnt/__init__.py
index 37abe45..70234a0 100644
--- a/xnt/__init__.py
+++ b/xnt/__init__.py
@@ -6,4 +6,5 @@ def target(fn):
print(fn.__name__ + ":")
return fn()
wrap.decorator = "target"
+ wrap.__doc__ = fn.__doc__
return wrap