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

Commit 4616f70

Browse filesBrowse files
authored
Merge pull request #15891 from timhoffm/doc-self
Mark self.* expressions in docstrings as literal
2 parents 0e0d72a + 83bfcae commit 4616f70
Copy full SHA for 4616f70

File tree

Expand file treeCollapse file tree

9 files changed

+17
-16
lines changed
Filter options
Expand file treeCollapse file tree

9 files changed

+17
-16
lines changed

‎examples/widgets/rectangle_selector.py

Copy file name to clipboardExpand all lines: examples/widgets/rectangle_selector.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
the button. This class gives click- and release-events and also draws
88
a line or a box from the click-point to the actual mouseposition
99
(within the same axes) until the button is released. Within the
10-
method 'self.ignore()' it is checked whether the button from eventpress
10+
method ``self.ignore()`` it is checked whether the button from eventpress
1111
and eventrelease are the same.
1212
"""
1313
from matplotlib.widgets import RectangleSelector

‎lib/matplotlib/axis.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axis.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def _set_labelrotation(self, labelrotation):
228228
self._labelrotation = (mode, angle)
229229

230230
def apply_tickdir(self, tickdir):
231-
"""Calculate self._pad and self._tickmarkers."""
231+
"""Calculate ``self._pad`` and ``self._tickmarkers``."""
232232

233233
def get_tickdir(self):
234234
return self._tickdir

‎lib/matplotlib/backend_tools.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_tools.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ToolBase:
5959
Keymap to associate with this tool
6060
6161
**String**: List of comma separated keys that will be used to call this
62-
tool when the keypress event of *self.figure.canvas* is emitted
62+
tool when the keypress event of ``self.figure.canvas`` is emitted
6363
"""
6464

6565
description = None
@@ -675,8 +675,8 @@ def _axes_pos(self, ax):
675675

676676
def update_home_views(self, figure=None):
677677
"""
678-
Make sure that self.home_views has an entry for all axes present in the
679-
figure
678+
Make sure that ``self.home_views`` has an entry for all axes present
679+
in the figure.
680680
"""
681681

682682
if not figure:

‎lib/matplotlib/backends/backend_pdf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pdf.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ def fontName(self, fontprop):
682682
def dviFontName(self, dvifont):
683683
"""
684684
Given a dvi font object, return a name suitable for Op.selectfont.
685-
This registers the font information in self.dviFontInfo if not yet
685+
This registers the font information in ``self.dviFontInfo`` if not yet
686686
registered.
687687
"""
688688

@@ -2282,7 +2282,7 @@ def pop(self):
22822282
return [Op.grestore]
22832283

22842284
def clip_cmd(self, cliprect, clippath):
2285-
"""Set clip rectangle. Calls self.pop() and self.push()."""
2285+
"""Set clip rectangle. Calls `.pop()` and `.push()`."""
22862286
cmds = []
22872287
# Pop graphics state until we hit the right one or the stack is empty
22882288
while ((self._cliprect, self._clippath) != (cliprect, clippath)

‎lib/matplotlib/colors.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colors.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ def _set_extremes(self):
646646
self._lut[self._i_bad] = self._rgba_bad
647647

648648
def _init(self):
649-
"""Generate the lookup table, self._lut"""
649+
"""Generate the lookup table, ``self._lut``."""
650650
raise NotImplementedError("Abstract class only")
651651

652652
def is_gray(self):
@@ -983,9 +983,9 @@ def __call__(self, value, clip=None):
983983
"""
984984
Normalize *value* data in the ``[vmin, vmax]`` interval into
985985
the ``[0.0, 1.0]`` interval and return it. *clip* defaults
986-
to *self.clip* (which defaults to *False*). If not already
986+
to ``self.clip`` (which defaults to *False*). If not already
987987
initialized, *vmin* and *vmax* are initialized using
988-
*autoscale_None(value)*.
988+
``autoscale_None(value)``.
989989
"""
990990
if clip is None:
991991
clip = self.clip

‎lib/matplotlib/offsetbox.py

Copy file name to clipboardExpand all lines: lib/matplotlib/offsetbox.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ def __init__(self, loc,
10781078
10791079
frameon : draw a frame box if True.
10801080
1081-
bbox_to_anchor : bbox to anchor. Use self.axes.bbox if None.
1081+
bbox_to_anchor : bbox to anchor. Use ``self.axes.bbox`` if None.
10821082
10831083
bbox_transform : with which the bbox_to_anchor will be transformed.
10841084

‎lib/matplotlib/tests/test_transforms.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_transforms.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_non_affine_caching():
1515
class AssertingNonAffineTransform(mtransforms.Transform):
1616
"""
1717
This transform raises an assertion error when called when it
18-
shouldn't be and self.raise_on_transform is True.
18+
shouldn't be and ``self.raise_on_transform`` is True.
1919
2020
"""
2121
input_dims = output_dims = 2

‎lib/matplotlib/text.py

Copy file name to clipboardExpand all lines: lib/matplotlib/text.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,11 +1894,12 @@ def set_annotation_clip(self, b):
18941894
Parameters
18951895
----------
18961896
b : bool or None
1897-
- True: the annotation will only be drawn when self.xy is inside
1898-
the axes.
1897+
- True: the annotation will only be drawn when ``self.xy`` is
1898+
inside the axes.
18991899
- False: the annotation will always be drawn regardless of its
19001900
position.
1901-
- None: the self.xy will be checked only if *xycoords* is "data".
1901+
- None: the ``self.xy`` will be checked only if *xycoords* is
1902+
"data".
19021903
"""
19031904
self._annotation_clip = b
19041905

‎lib/matplotlib/tri/triinterpolate.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tri/triinterpolate.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ def __init__(self, vals, rows, cols, shape):
12451245
def dot(self, V):
12461246
"""
12471247
Dot product of self by a vector *V* in sparse-dense to dense format
1248-
*V* dense vector of shape (self.m,)
1248+
*V* dense vector of shape (self.m,).
12491249
"""
12501250
assert V.shape == (self.m,)
12511251
return np.bincount(self.rows,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.