summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <ixce@ed3n-m.(none)>2009-10-22 20:41:55 +0200
committerGuillaume Seguin <ixce@ed3n-m.(none)>2009-10-22 20:41:55 +0200
commitb8836feed275ceff63c325bf1e49fba3c71cf512 (patch)
treeabe32385597097829e9ad8a6881f25825fdf03e6
parent86834b210eb117377115b73ff62e2ee8c6ca64b9 (diff)
downloadumlpy-b8836feed275ceff63c325bf1e49fba3c71cf512.tar.gz
umlpy-b8836feed275ceff63c325bf1e49fba3c71cf512.tar.bz2
Add @doc docstring option for properties
-rw-r--r--grapher.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/grapher.py b/grapher.py
index aeaa447..a54bcc7 100644
--- a/grapher.py
+++ b/grapher.py
@@ -143,8 +143,10 @@ for doc in docs:
epydoc.docstringparser.parse_docstring (var_var, None)
if options.debug:
print var_name, var_var.name, get_var_type (var_var)
- var_var_name = str (var_var.name.replace (prefix, ""))
- vars_dict[var_name].append ((var_var_name, get_var_type (var_var)))
+ var_type = get_var_type (var_var)
+ if all_properties or "@doc" in str (var_var.docstring) or var_type:
+ var_var_name = str (var_var.name.replace (prefix, ""))
+ 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 no_method:
@@ -245,8 +247,6 @@ for class_name in classes:
if is_excluded (class_name):
continue
for (var_name, type_name) in vars_dict[class_name]:
- if not all_properties and (not type_name or is_excluded (type_name)):
- continue
if class_name not in var_fields_dict:
var_fields_dict[class_name] = []
method_fields_dict[class_name] = []