Skip to content

Docstring cleanups. #20973

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
Sep 2, 2021
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 lib/matplotlib/backend_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ class ToolHelpBase(ToolBase):
@staticmethod
def format_shortcut(key_sequence):
"""
Converts a shortcut string from the notation used in rc config to the
Convert a shortcut string from the notation used in rc config to the
standard notation for displaying shortcuts, e.g. 'ctrl+a' -> 'Ctrl+A'.
"""
return (key_sequence if len(key_sequence) == 1 else
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/backends/backend_wx.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,8 @@ def _get_imagesave_wildcards(self):
@_api.delete_parameter("3.4", "origin")
def gui_repaint(self, drawDC=None, origin='WX'):
"""
Performs update of the displayed image on the GUI canvas, using the
supplied wx.PaintDC device context.
Update the displayed image on the GUI canvas, using the supplied
wx.PaintDC device context.

The 'WXAgg' backend sets origin accordingly.
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2324,7 +2324,7 @@ def blend_soft_light(self, rgb, intensity):

def blend_overlay(self, rgb, intensity):
"""
Combines an rgb image with an intensity map using "overlay" blending.
Combine an rgb image with an intensity map using "overlay" blending.

Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def get_markevery(self):

def set_picker(self, p):
"""
Sets the event picker details for the line.
Set the event picker details for the line.

Parameters
----------
Expand Down Expand Up @@ -688,7 +688,7 @@ def recache(self, always=False):

def _transform_path(self, subslice=None):
"""
Puts a TransformedPath instance at self._transformed_path;
Put a TransformedPath instance at self._transformed_path;
all invalidation of the transform is then handled by the
TransformedPath instance.
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def __init__(self, vertices, codes=None, _interpolation_steps=1,
@classmethod
def _fast_from_codes_and_verts(cls, verts, codes, internals_from=None):
"""
Creates a Path instance without the expense of calling the constructor.
Create a Path instance without the expense of calling the constructor.

Parameters
----------
Expand Down
7 changes: 4 additions & 3 deletions lib/matplotlib/testing/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
========================
Widget testing utilities
========================
Functions that are useful for testing widgets.
See also matplotlib.tests.test_widgets

See also :mod:`matplotlib.tests.test_widgets`.
"""

import matplotlib.pyplot as plt
from unittest import mock


def get_ax():
"""Creates plot and returns its axes"""
"""Create a plot and return its axes."""
fig, ax = plt.subplots(1, 1)
ax.plot([0, 200], [0, 200])
ax.set_aspect(1.0)
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2710,7 +2710,7 @@ def onselect(eclick: MouseEvent, erelease: MouseEvent)

- "move": Move the existing shape, default: no modifier.
- "clear": Clear the current shape, default: "escape".
- "square": Makes the shape square, default: "shift".
- "square": Make the shape square, default: "shift".
- "center": Make the initial point the center of the shape,
default: "ctrl".

Expand Down
8 changes: 2 additions & 6 deletions lib/mpl_toolkits/axisartist/axisline_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

class _FancyAxislineStyle:
class SimpleArrow(FancyArrowPatch):
"""
The artist class that will be returned for SimpleArrow style.
"""
"""The artist class that will be returned for SimpleArrow style."""
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""The artist class that will be returned for SimpleArrow style."""
"""The artist returned when arrow style is SimpleArrow"""

_ARROW_STYLE = "->"

def __init__(self, axis_artist, line_path, transform,
Expand Down Expand Up @@ -69,9 +67,7 @@ def draw(self, renderer):
FancyArrowPatch.draw(self, renderer)

class FilledArrow(SimpleArrow):
"""
The artist class that will be returned for SimpleArrow style.
"""
"""The artist class that will be returned for SimpleArrow style."""
Copy link
Member

Choose a reason for hiding this comment

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

What triggers this versus returning the SimpleArrow above?

_ARROW_STYLE = "-|>"


Expand Down