summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-14 09:01:02 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-14 09:01:02 +0000
commita3dc04ade4c8b640a881519144f009b70c6e4cfd (patch)
tree784866653de95cb28d295dc7e039bc53f392750e /ipalib
parentf0dfb9f873ccafcc77b34e36f03723d73f9c5e0c (diff)
downloadfreeipa-a3dc04ade4c8b640a881519144f009b70c6e4cfd.tar.gz
freeipa-a3dc04ade4c8b640a881519144f009b70c6e4cfd.tar.xz
freeipa-a3dc04ade4c8b640a881519144f009b70c6e4cfd.zip
157: More docstring cleanup; fixed remaining epydoc warnings
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/__init__.py11
-rw-r--r--ipalib/plugable.py14
2 files changed, 17 insertions, 8 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py
index ddce3ac92..309bd2e20 100644
--- a/ipalib/__init__.py
+++ b/ipalib/__init__.py
@@ -18,5 +18,14 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
-IPA library.
+The IPA Library.
+
+To learn about the library, you should probably read the code in this order:
+
+ 1. Start with the `ipalib.plugable` module
+
+ 2. Then read the `ipalib.public` module
+
+Some of the plugin architecture was inspired by ``bzr``, so you might also
+read http://bazaar-vcs.org/WritingPlugins
"""
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 9fb3c0793..ba4be6be6 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -18,7 +18,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
-Base classes for plugin architecture.
+Generic plugin framework.
"""
import re
@@ -139,7 +139,7 @@ class Plugin(ReadOnly):
There are three different ways this can be called:
- 1. With a <type 'str'> argument, e.g.:
+ With a <type 'str'> argument, e.g.:
>>> class base(ProxyTarget):
>>> __public__ = frozenset(['some_attr', 'another_attr'])
@@ -148,14 +148,14 @@ class Plugin(ReadOnly):
>>> base.implements('an_unknown_attribute')
False
- 2. With a <type 'frozenset'> argument, e.g.:
+ With a <type 'frozenset'> argument, e.g.:
>>> base.implements(frozenset(['some_attr']))
True
>>> base.implements(frozenset(['some_attr', 'an_unknown_attribute']))
False
- 3. With any object that has a `__public__` attribute that is
+ With any object that has a `__public__` attribute that is
<type 'frozenset'>, e.g.:
>>> class whatever(object):
@@ -182,12 +182,12 @@ class Plugin(ReadOnly):
@classmethod
def implemented_by(cls, arg):
"""
- Returns True if.
+ Returns True if:
1. ``arg`` is an instance of or subclass of this class, and
2. ``arg`` (or ``arg.__class__`` if instance) has an attribute for
- each name in this class's ``__public__`` frozenset
+ each name in this class's ``__public__`` frozenset
Otherwise, returns False.
@@ -471,7 +471,7 @@ class NameSpace(ReadOnly):
class Registrar(ReadOnly):
def __init__(self, *allowed):
"""
- :param *allowed: Base classes from which plugins accepted by this
+ :param allowed: Base classes from which plugins accepted by this
Registrar must subclass.
"""
self.__allowed = frozenset(allowed)