Some documentation stuff

This commit is contained in:
enkore 2014-04-23 14:45:29 +02:00
parent aef55aaad0
commit 4109515914
3 changed files with 13 additions and 9 deletions

View File

@ -1,6 +1,5 @@
class BaseDesktopNotification:
class DesktopNotification:
""" """
Class to display a desktop notification Class to display a desktop notification
@ -26,6 +25,9 @@ class DesktopNotification:
""" """
return False return False
class DesktopNotification(BaseDesktopNotification):
pass
try: try:
from gi.repository import Notify from gi.repository import Notify
except ImportError: except ImportError:

View File

@ -13,14 +13,15 @@ class SettingsBase:
The constructor is either passed a dictionary containing these settings, or The constructor is either passed a dictionary containing these settings, or
keyword arguments specifying the same. keyword arguments specifying the same.
Settings are stored as attributes of self Settings are stored as attributes of self.
""" """
settings = tuple() settings = tuple()
"""settings should be tuple containing two types of elements: """settings should be tuple containing two types of elements:
* bare strings, which must be valid identifiers.
* bare strings, which must be valid Python identifiers.
* two-tuples, the first element being a identifier (as above) and the second * two-tuples, the first element being a identifier (as above) and the second
a docstring for the particular setting""" a docstring for the particular setting"""
required = tuple() required = tuple()
"""required can list settings which are required""" """required can list settings which are required"""

View File

@ -163,7 +163,7 @@ def formatp(string, **kwargs):
thus equivalent to a logical or of all enclosing groups with the enclosed thus equivalent to a logical or of all enclosing groups with the enclosed
group. group.
Escaped brackets, i.e. \\[ and \\] are copied verbatim to output. Escaped brackets, i.e. \\\\[ and \\\\] are copied verbatim to output.
:param string: Format string :param string: Format string
:param **kwargs: keyword arguments providing data for the format string :param **kwargs: keyword arguments providing data for the format string
@ -321,9 +321,9 @@ class TimeWrapper:
def require(predicate): def require(predicate):
""" """Decorator factory for methods requiring a predicate. If the
Decorator factory for methods requiring a predicate. If the predicate is not fulfilled during a method call, the predicate is not fulfilled during a method call, the method call
method call is skipped and None is returned. is skipped and None is returned.
:param predicate: A callable returning a truth value :param predicate: A callable returning a truth value
:returns: Method decorator :returns: Method decorator
@ -331,6 +331,7 @@ def require(predicate):
.. seealso:: .. seealso::
:py:func:`internet` :py:func:`internet`
""" """
def decorator(method): def decorator(method):
@functools.wraps(method) @functools.wraps(method)