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 DesktopNotification:
class BaseDesktopNotification:
"""
Class to display a desktop notification
@ -26,6 +25,9 @@ class DesktopNotification:
"""
return False
class DesktopNotification(BaseDesktopNotification):
pass
try:
from gi.repository import Notify
except ImportError:

View File

@ -13,14 +13,15 @@ class SettingsBase:
The constructor is either passed a dictionary containing these settings, or
keyword arguments specifying the same.
Settings are stored as attributes of self
Settings are stored as attributes of self.
"""
settings = tuple()
"""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
a docstring for the particular setting"""
a docstring for the particular setting"""
required = tuple()
"""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
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 **kwargs: keyword arguments providing data for the format string
@ -321,9 +321,9 @@ class TimeWrapper:
def require(predicate):
"""
Decorator factory for methods requiring a predicate. If the predicate is not fulfilled during a method call, the
method call is skipped and None is returned.
"""Decorator factory for methods requiring a predicate. If the
predicate is not fulfilled during a method call, the method call
is skipped and None is returned.
:param predicate: A callable returning a truth value
:returns: Method decorator
@ -331,6 +331,7 @@ def require(predicate):
.. seealso::
:py:func:`internet`
"""
def decorator(method):
@functools.wraps(method)