8000 STY: Apply check-docstring-first pre-commit hook · matplotlib/matplotlib@1a36dc8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a36dc8

Browse files
STY: Apply check-docstring-first pre-commit hook
1 parent 0f0a977 commit 1a36dc8

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

lib/matplotlib/_constrained_layout.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,7 @@
1111
layout. Axes manually placed via ``figure.add_axes()`` will not.
1212
1313
See Tutorial: :doc:`/tutorials/intermediate/constrainedlayout_guide`
14-
"""
15-
16-
import logging
17-
18-
import numpy as np
19-
20-
from matplotlib import _api, artist as martist
21-
from matplotlib._tight_layout import get_renderer
22-
import matplotlib.transforms as mtransforms
23-
import matplotlib._layoutgrid as mlayoutgrid
24-
25-
26-
_log = logging.getLogger(__name__)
2714
28-
"""
2915
General idea:
3016
-------------
3117
@@ -61,6 +47,18 @@
6147
for more discussion of the algorithm with examples.
6248
"""
6349

50+
import logging
51+
52+
import numpy as np
53+
54+
from matplotlib import _api, artist as martist
55+
from matplotlib._tight_layout import get_renderer
56+
import matplotlib.transforms as mtransforms
57+
import matplotlib._layoutgrid as mlayoutgrid
58+
59+
60+
_log = logging.getLogger(__name__)
61+
6462

6563
######################################################
6664
def do_constrained_layout(fig, h_pad, w_pad,

lib/matplotlib/backend_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,12 +989,12 @@ def trigger(self, *args, **kwargs):
989989
'help': ToolHelpBase,
990990
'copy': ToolCopyToClipboardBase,
991991
}
992-
"""Default tools"""
992+
# Default tools
993993

994994
default_toolbar_tools = [['navigation', ['home', 'back', 'forward']],
995995
['zoompan', ['pan', 'zoom', 'subplots']],
996996
['io', ['save', 'help']]]
997-
"""Default tools in the toolbar"""
997+
# Default tools in the toolbar
998998

999999

10001000
def add_tools_to_manager(toolmanager, tools=default_tools):

lib/matplotlib/dates.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,7 @@ def _get_tzinfo(tz=None):
222222
raise TypeError("tz must be string or tzinfo subclass.")
223223

224224

225-
"""
226-
Time-related constants.
227-
"""
225+
# Time-related constants.
228226
EPOCH_OFFSET = float(datetime.datetime(1970, 1, 1).toordinal())
229227
# EPOCH_OFFSET is not used by matplotlib
230228
JULIAN_OFFSET = 1721424.5 # Julian date at 0000-12-31

0 commit comments

Comments
 (0)
0