Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Mark self.* expressions in docstrings as literal #15891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 examples/widgets/rectangle_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
the button. This class gives click- and release-events and also draws
a line or a box from the click-point to the actual mouseposition
(within the same axes) until the button is released. Within the
method 'self.ignore()' it is checked whether the button from eventpress
method ``self.ignore()`` it is checked whether the button from eventpress
Copy link
Contributor

@anntzer anntzer Dec 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should really be within :meth:`.ignore`, no? (not that it really matters here as this is not an API doc, but still...).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, possibly. But there are multiple .ignore methods and I was too lazy to find out which one to link. IMHO it's good enough for now.

and eventrelease are the same.
"""
from matplotlib.widgets import RectangleSelector
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _set_labelrotation(self, labelrotation):
self._labelrotation = (mode, angle)

def apply_tickdir(self, tickdir):
"""Calculate self._pad and self._tickmarkers."""
"""Calculate ``self._pad`` and ``self._tickmarkers``."""

def get_tickdir(self):
return self._tickdir
Expand Down
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/backend_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ToolBase:
Keymap to associate with this tool

**String**: List of comma separated keys that will be used to call this
tool when the keypress event of *self.figure.canvas* is emitted
tool when the keypress event of ``self.figure.canvas`` is emitted
"""

description = None
Expand Down Expand Up @@ -675,8 +675,8 @@ def _axes_pos(self, ax):

def update_home_views(self, figure=None):
"""
Make sure that self.home_views has an entry for all axes present in the
figure
Make sure that ``self.home_views`` has an entry for all axes present
in the figure.
"""

if not figure:
Expand Down
4 changes: 2 additions & 2 deletions 4 lib/matplotlib/backends/backend_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def fontName(self, fontprop):
def dviFontName(self, dvifont):
"""
Given a dvi font object, return a name suitable for Op.selectfont.
This registers the font information in self.dviFontInfo if not yet
This registers the font information in ``self.dviFontInfo`` if not yet
registered.
"""

Expand Down Expand Up @@ -2282,7 +2282,7 @@ def pop(self):
return [Op.grestore]

def clip_cmd(self, cliprect, clippath):
"""Set clip rectangle. Calls self.pop() and self.push()."""
"""Set clip rectangle. Calls `.pop()` and `.push()`."""
cmds = []
# Pop graphics state until we hit the right one or the stack is empty
while ((self._cliprect, self._clippath) != (cliprect, clippath)
Expand Down
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ def _set_extremes(self):
self._lut[self._i_bad] = self._rgba_bad

def _init(self):
"""Generate the lookup table, self._lut"""
"""Generate the lookup table, ``self._lut``."""
raise NotImplementedError("Abstract class only")

def is_gray(self):
Expand Down Expand Up @@ -983,9 +983,9 @@ def __call__(self, value, clip=None):
"""
Normalize *value* data in the ``[vmin, vmax]`` interval into
the ``[0.0, 1.0]`` interval and return it. *clip* defaults
to *self.clip* (which defaults to *False*). If not already
to ``self.clip`` (which defaults to *False*). If not already
initialized, *vmin* and *vmax* are initialized using
*autoscale_None(value)*.
``autoscale_None(value)``.
"""
if clip is None:
clip = self.clip
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ def __init__(self, loc,

frameon : draw a frame box if True.

bbox_to_anchor : bbox to anchor. Use self.axes.bbox if None.
bbox_to_anchor : bbox to anchor. Use ``self.axes.bbox`` if None.

bbox_transform : with which the bbox_to_anchor will be transformed.

Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/tests/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_non_affine_caching():
class AssertingNonAffineTransform(mtransforms.Transform):
"""
This transform raises an assertion error when called when it
shouldn't be and self.raise_on_transform is True.
shouldn't be and ``self.raise_on_transform`` is True.

"""
input_dims = output_dims = 2
Expand Down
7 changes: 4 additions & 3 deletions 7 lib/matplotlib/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -1894,11 +1894,12 @@ def set_annotation_clip(self, b):
Parameters
----------
b : bool or None
- True: the annotation will only be drawn when self.xy is inside
the axes.
- True: the annotation will only be drawn when ``self.xy`` is
inside the axes.
- False: the annotation will always be drawn regardless of its
position.
- None: the self.xy will be checked only if *xycoords* is "data".
- None: the ``self.xy`` will be checked only if *xycoords* is
"data".
"""
self._annotation_clip = b

Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/tri/triinterpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ def __init__(self, vals, rows, cols, shape):
def dot(self, V):
"""
Dot product of self by a vector *V* in sparse-dense to dense format
*V* dense vector of shape (self.m,)
*V* dense vector of shape (self.m,).
"""
assert V.shape == (self.m,)
return np.bincount(self.rows,
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.