summaryrefslogtreecommitdiffstats
path: root/makeapi
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-05-30 09:40:07 +0200
committerJan Cholasta <jcholast@redhat.com>2016-06-03 09:00:34 +0200
commited4c2d9252a995d01dc098e5b761ded8cd9373d8 (patch)
tree67740ac3ee8133a7bd49ffef5ee216762b25cc89 /makeapi
parentfe18adb25839bf191aa748f13e75bfccb10f4a57 (diff)
downloadfreeipa-ed4c2d9252a995d01dc098e5b761ded8cd9373d8.tar.gz
freeipa-ed4c2d9252a995d01dc098e5b761ded8cd9373d8.tar.xz
freeipa-ed4c2d9252a995d01dc098e5b761ded8cd9373d8.zip
plugable: turn Plugin attributes into properties
Implement the `name`, `doc` and `summary` Plugin attributes as properties to allow them to be overriden in sub-classes. Always use .doc rather than .__doc__ to access plugin documentation. Remove the mostly unused `module`, `fullname`, `bases` and `label` attributes. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'makeapi')
-rwxr-xr-xmakeapi4
1 files changed, 2 insertions, 2 deletions
diff --git a/makeapi b/makeapi
index 476b65149..309bad8d6 100755
--- a/makeapi
+++ b/makeapi
@@ -214,13 +214,13 @@ def validate_doc():
topic = next_topic
# Does the command have documentation?
- if cmd.__doc__ is None:
+ if cmd.doc is None:
src_file = inspect.getsourcefile(cmd_class)
line_num = inspect.getsourcelines(cmd_class)[1]
n_missing_cmd_doc += 1
print("%s:%d command \"%s\" has no doc" % (src_file, line_num, cmd.name))
# Yes the command has doc, but is it internationalized?
- elif not is_i18n(cmd.__doc__):
+ elif not is_i18n(cmd.doc):
src_file = inspect.getsourcefile(cmd_class)
line_num = inspect.getsourcelines(cmd_class)[1]
n_missing_cmd_i18n += 1