diff --git a/i3pystatus/core/desktop.py b/i3pystatus/core/desktop.py index bac04a6..a457cad 100644 --- a/i3pystatus/core/desktop.py +++ b/i3pystatus/core/desktop.py @@ -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: diff --git a/i3pystatus/core/settings.py b/i3pystatus/core/settings.py index db3ba60..992df69 100644 --- a/i3pystatus/core/settings.py +++ b/i3pystatus/core/settings.py @@ -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""" diff --git a/i3pystatus/core/util.py b/i3pystatus/core/util.py index d242370..81a83c5 100644 --- a/i3pystatus/core/util.py +++ b/i3pystatus/core/util.py @@ -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)