Move with_docstring function to powerline.segments
This commit is contained in:
parent
f4e49e2ee6
commit
86c3768e4e
|
@ -256,8 +256,3 @@ class KwThreadedSegment(ThreadedSegment):
|
|||
@staticmethod
|
||||
def render_one(update_state, **kwargs):
|
||||
return update_state
|
||||
|
||||
|
||||
def with_docstring(instance, doc):
|
||||
instance.__doc__ = doc
|
||||
return instance
|
||||
|
|
|
@ -40,7 +40,7 @@ class Segment(object):
|
|||
'''List arguments which should be omitted
|
||||
|
||||
Returns a tuple with indexes of omitted arguments.
|
||||
|
||||
|
||||
.. note::``segment_info``, ``create_watcher`` and ``pl`` will be omitted
|
||||
regardless of the below return (for ``segment_info`` and
|
||||
``create_watcher``: only if object was marked to require segment
|
||||
|
@ -56,3 +56,8 @@ class Segment(object):
|
|||
'''Returns a list of (additional argument name[, default value]) tuples.
|
||||
'''
|
||||
return ()
|
||||
|
||||
|
||||
def with_docstring(instance, doc):
|
||||
instance.__doc__ = doc
|
||||
return instance
|
||||
|
|
|
@ -15,12 +15,12 @@ from powerline.lib import add_divider_highlight_group
|
|||
from powerline.lib.shell import asrun, run_cmd
|
||||
from powerline.lib.url import urllib_read, urllib_urlencode
|
||||
from powerline.lib.vcs import guess, tree_status
|
||||
from powerline.lib.threaded import ThreadedSegment, KwThreadedSegment, with_docstring
|
||||
from powerline.lib.threaded import ThreadedSegment, KwThreadedSegment
|
||||
from powerline.lib.monotonic import monotonic
|
||||
from powerline.lib.humanize_bytes import humanize_bytes
|
||||
from powerline.lib.unicode import u
|
||||
from powerline.theme import requires_segment_info, requires_filesystem_watcher
|
||||
from powerline.segments import Segment
|
||||
from powerline.segments import Segment, with_docstring
|
||||
from collections import namedtuple
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue