Skip to content

Commit 334dd1b

Browse files
authored
Merge pull request #20983 from meeseeksmachine/auto-backport-of-pr-20973-on-v3.5.x
Backport PR #20973 on branch v3.5.x (Docstring cleanups.)
2 parents 2c1a30c + fabcce1 commit 334dd1b

File tree

8 files changed

+14
-17
lines changed

8 files changed

+14
-17
lines changed

lib/matplotlib/backend_tools.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ class ToolHelpBase(ToolBase):
900900
@staticmethod
901901
def format_shortcut(key_sequence):
902902
"""
903-
Converts a shortcut string from the notation used in rc config to the
903+
Convert a shortcut string from the notation used in rc config to the
904904
standard notation for displaying shortcuts, e.g. 'ctrl+a' -> 'Ctrl+A'.
905905
"""
906906
return (key_sequence if len(key_sequence) == 1 else

lib/matplotlib/backends/backend_wx.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,8 @@ def _get_imagesave_wildcards(self):
592592
@_api.delete_parameter("3.4", "origin")
593593
def gui_repaint(self, drawDC=None, origin='WX'):
594594
"""
595-
Performs update of the displayed image on the GUI canvas, using the
596-
supplied wx.PaintDC device context.
595+
Update the displayed image on the GUI canvas, using the supplied
596+
wx.PaintDC device context.
597597
598598
The 'WXAgg' backend sets origin accordingly.
599599
"""

lib/matplotlib/colors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2373,7 +2373,7 @@ def blend_soft_light(self, rgb, intensity):
23732373

23742374
def blend_overlay(self, rgb, intensity):
23752375
"""
2376-
Combines an rgb image with an intensity map using "overlay" blending.
2376+
Combine an rgb image with an intensity map using "overlay" blending.
23772377
23782378
Parameters
23792379
----------

lib/matplotlib/lines.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ def get_markevery(self):
601601

602602
def set_picker(self, p):
603603
"""
604-
Sets the event picker details for the line.
604+
Set the event picker details for the line.
605605
606606
Parameters
607607
----------
@@ -688,7 +688,7 @@ def recache(self, always=False):
688688

689689
def _transform_path(self, subslice=None):
690690
"""
691-
Puts a TransformedPath instance at self._transformed_path;
691+
Put a TransformedPath instance at self._transformed_path;
692692
all invalidation of the transform is then handled by the
693693
TransformedPath instance.
694694
"""

lib/matplotlib/path.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def __init__(self, vertices, codes=None, _interpolation_steps=1,
162162
@classmethod
163163
def _fast_from_codes_and_verts(cls, verts, codes, internals_from=None):
164164
"""
165-
Creates a Path instance without the expense of calling the constructor.
165+
Create a Path instance without the expense of calling the constructor.
166166
167167
Parameters
168168
----------

lib/matplotlib/testing/widgets.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
========================
33
Widget testing utilities
44
========================
5-
Functions that are useful for testing widgets.
6-
See also matplotlib.tests.test_widgets
5+
6+
See also :mod:`matplotlib.tests.test_widgets`.
77
"""
8+
89
import matplotlib.pyplot as plt
910
from unittest import mock
1011

1112

1213
def get_ax():
13-
"""Creates plot and returns its axes"""
14+
"""Create a plot and return its axes."""
1415
fig, ax = plt.subplots(1, 1)
1516
ax.plot([0, 200], [0, 200])
1617
ax.set_aspect(1.0)

lib/matplotlib/widgets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2710,7 +2710,7 @@ def onselect(eclick: MouseEvent, erelease: MouseEvent)
27102710
27112711
- "move": Move the existing shape, default: no modifier.
27122712
- "clear": Clear the current shape, default: "escape".
2713-
- "square": Makes the shape square, default: "shift".
2713+
- "square": Make the shape square, default: "shift".
27142714
- "center": Make the initial point the center of the shape,
27152715
default: "ctrl".
27162716

lib/mpl_toolkits/axisartist/axisline_style.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99

1010
class _FancyAxislineStyle:
1111
class SimpleArrow(FancyArrowPatch):
12-
"""
13-
The artist class that will be returned for SimpleArrow style.
14-
"""
12+
"""The artist class that will be returned for SimpleArrow style."""
1513
_ARROW_STYLE = "->"
1614

1715
def __init__(self, axis_artist, line_path, transform,
@@ -69,9 +67,7 @@ def draw(self, renderer):
6967
FancyArrowPatch.draw(self, renderer)
7068

7169
class FilledArrow(SimpleArrow):
72-
"""
73-
The artist class that will be returned for SimpleArrow style.
74-
"""
70+
"""The artist class that will be returned for SimpleArrow style."""
7571
_ARROW_STYLE = "-|>"
7672

7773

0 commit comments

Comments
 (0)