Some documentation stuff
This commit is contained in:
parent
aef55aaad0
commit
4109515914
@ -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:
|
||||
|
@ -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"""
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user