summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <ixce@ed3n-m.(none)>2009-10-22 17:07:38 +0200
committerGuillaume Seguin <ixce@ed3n-m.(none)>2009-10-22 17:07:38 +0200
commitb224514c618ded69cba207c8383340403cf0dfa5 (patch)
treeb61fbe283183e5b376afe4c92c1bdd547dbc8e46
parent810b52df384e0d5f6f26b1a209524845cbf6d4f1 (diff)
downloadumlpy-b224514c618ded69cba207c8383340403cf0dfa5.tar.gz
umlpy-b224514c618ded69cba207c8383340403cf0dfa5.tar.bz2
Add option to show all methods
-rw-r--r--grapher.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/grapher.py b/grapher.py
index a9e7f19..e06db11 100644
--- a/grapher.py
+++ b/grapher.py
@@ -30,6 +30,9 @@ parser.add_option("-f", "--force", dest = "forces", action = "append",
default = [],
help = "classes matching this regexp will be forced into \
display")
+parser.add_option("--all-methods", dest = "all_methods", action = "store_true",
+ default = False,
+ help = "show all methods")
(options, args) = parser.parse_args ()
@@ -40,10 +43,12 @@ includes = reduce (lambda x, y: x + y,
forces = reduce (lambda x, y: x + y,
map (lambda s: s.split(","), options.forces), [])
prefix = options.prefix
+all_methods = options.all_methods
print "Settings"
print "--------"
print "Prefix :", prefix
+print "Show all methods :", all_methods
print "Excludes :", excludes
print "Includes :", includes
print "Forces :", forces
@@ -120,7 +125,7 @@ for doc in docs:
vars_dict[var_name].append ((var_var_name, get_var_type (var_var)))
elif type (var_var.value) in (epydoc.apidoc.RoutineDoc,
epydoc.apidoc.StaticMethodDoc):
- if "@doc" in str (var_var.value.docstring):
+ if all_methods or "@doc" in str (var_var.value.docstring):
methods_dict[var_name].append (str (var_var.name))
else:
print type (var_var.value)