Use `:py:meth` for referring to methods

This commit is contained in:
ZyX 2015-01-27 20:24:45 +03:00
parent 36d64bc3da
commit 7250cd4bd8
1 changed files with 8 additions and 5 deletions

View File

@ -124,8 +124,10 @@ class Renderer(object):
'getcwd': getattr(os, 'getcwdu', os.getcwd), 'getcwd': getattr(os, 'getcwdu', os.getcwd),
'home': os.environ.get('HOME'), 'home': os.environ.get('HOME'),
} }
'''Basic segment info. Is merged with local segment information by '''Basic segment info
``.get_segment_info()`` method. Keys:
Is merged with local segment information by :py:meth:`get_segment_info`
method. Keys:
``environ`` ``environ``
Object containing environment variables. Must define at least the Object containing environment variables. Must define at least the
@ -279,9 +281,10 @@ class Renderer(object):
string_width)``. Returns a three-tuple if ``output_raw`` is also string_width)``. Returns a three-tuple if ``output_raw`` is also
``True``: ``(colored_string, colorless_string, string_width)``. ``True``: ``(colored_string, colorless_string, string_width)``.
:param dict segment_info: :param dict segment_info:
Segment information. See also ``.get_segment_info()`` method. Segment information. See also :py:meth:`get_segment_info` method.
:param matcher_info: :param matcher_info:
Matcher information. Is processed in ``.get_theme()`` method. Matcher information. Is processed in :py:meth:`get_segment_info`
method.
''' '''
theme = self.get_theme(matcher_info) theme = self.get_theme(matcher_info)
return self.do_render( return self.do_render(
@ -504,7 +507,7 @@ class Renderer(object):
def hl(self, contents, fg=None, bg=None, attrs=None): def hl(self, contents, fg=None, bg=None, attrs=None):
'''Output highlighted chunk. '''Output highlighted chunk.
This implementation just outputs ``.hlstyle()`` joined with This implementation just outputs :py:meth:`hlstyle` joined with
``contents``. ``contents``.
''' '''
return self.hlstyle(fg, bg, attrs) + (contents or '') return self.hlstyle(fg, bg, attrs) + (contents or '')