summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <ixce@ed3n-m.(none)>2009-10-22 20:12:14 +0200
committerGuillaume Seguin <ixce@ed3n-m.(none)>2009-10-22 20:12:14 +0200
commit65fe4240fa9ed80964d2f63ad2941744bf7b5ba8 (patch)
tree63cf11cf511c5801676ad1952185041fb417dd58
parent3c26efdc44d93924903cab8a190456f034eb2d7a (diff)
downloadumlpy-65fe4240fa9ed80964d2f63ad2941744bf7b5ba8.tar.gz
umlpy-65fe4240fa9ed80964d2f63ad2941744bf7b5ba8.tar.bz2
Add nodoc docstring option and sort variables/methods by name
-rw-r--r--grapher.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/grapher.py b/grapher.py
index 833f198..46f210f 100644
--- a/grapher.py
+++ b/grapher.py
@@ -135,7 +135,8 @@ 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 all_methods or "@doc" in str (var_var.value.docstring):
+ if (all_methods or "@doc" in str (var_var.value.docstring)) \
+ and not "@nodoc" in str (var_var.value.docstring):
methods_dict[var_name].append (str (var_var.name))
else:
print type (var_var.value)
@@ -181,9 +182,9 @@ FIELD_FORMATTER = """ <TR>
def build_record_label (class_name):
fields = "".join ([FIELD_FORMATTER % (VAR_FIELD_COLOR, field, field)
- for field in var_fields_dict[class_name]])
+ for field in sorted (var_fields_dict[class_name])])
fields += "".join ([FIELD_FORMATTER % (METHOD_FIELD_COLOR, field, field)
- for field in method_fields_dict[class_name]])
+ for field in sorted (method_fields_dict[class_name])])
return LABEL_BASE % (CLASS_COLOR, class_name, class_name, fields)
def build_simple_label (class_name):