Skip to content

Commit ee50c8f

Browse files
committed
Fix to pydocstyle D209 (Multi-line docstring closing quotes should be on a separate line)
1 parent 382be60 commit ee50c8f

File tree

3 files changed

+44
-23
lines changed

3 files changed

+44
-23
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ignore =
1313
N801, N802, N803, N806, N812,
1414
# pydocstyle
1515
D100, D101, D102, D103, D104, D105, D106, D107,
16-
D200, D202, D203, D204, D205, D207, D209, D212, D213,
16+
D200, D202, D203, D204, D205, D207, D212, D213,
1717
D301
1818
D400, D401, D402, D403, D413,
1919

lib/matplotlib/backends/backend_pdf.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,12 @@
9595

9696

9797
def fill(strings, linelen=75):
98-
"""Make one string from sequence of strings, with whitespace
99-
in between. The whitespace is chosen to form lines of at most
100-
linelen characters, if possible."""
98+
"""
99+
Make one string from sequence of strings, with whitespace in between.
100+
101+
The whitespace is chosen to form lines of at most *linelen* characters,
102+
if possible.
103+
"""
101104
currpos = 0
102105
lasti = 0
103106
result = []
@@ -295,8 +298,7 @@ def pdfRepr(self):
295298

296299

297300
class Verbatim:
298-
"""Store verbatim PDF command content for later inclusion in the
299-
stream."""
301+
"""Store verbatim PDF command content for later inclusion in the stream."""
300302
def __init__(self, x):
301303
self._x = x
302304

@@ -322,9 +324,16 @@ def pdfRepr(self):
322324

323325

324326
def _paint_path(fill, stroke):
325-
"""Return the PDF operator to paint a path in the following way:
326-
fill: fill the path with the fill color
327-
stroke: stroke the outline of the path with the line color"""
327+
"""
328+
Return the PDF operator to paint a path.
329+
330+
Parameters
331+
----------
332+
fill: bool
333+
Fill the path with the fill color.
334+
stroke: bool
335+
Stroke the outline of the path with the line color.
336+
"""
328337
if stroke:
329338
if fill:
330339
return Op.fill_stroke
@@ -339,7 +348,8 @@ def _paint_path(fill, stroke):
339348

340349

341350
class Stream:
342-
"""PDF stream object.
351+
"""
352+
PDF stream object.
343353
344354
This has no pdfRepr method. Instead, call begin(), then output the
345355
contents of the stream by calling write(), and finally call end().

lib/matplotlib/dviread.py

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,45 +69,55 @@
6969
# argument bytes in this delta.
7070

7171
def _arg_raw(dvi, delta):
72-
"""Return *delta* without reading anything more from the dvi file"""
72+
"""Return *delta* without reading anything more from the dvi file."""
7373
return delta
7474

7575

7676
def _arg(bytes, signed, dvi, _):
77-
"""Read *bytes* bytes, returning the bytes interpreted as a
78-
signed integer if *signed* is true, unsigned otherwise."""
77+
"""
78+
Read *bytes* bytes, returning the bytes interpreted as a signed integer
79+
if *signed* is true, unsigned otherwise.
80+
"""
7981
return dvi._arg(bytes, signed)
8082

8183

8284
def _arg_slen(dvi, delta):
83-
"""Signed, length *delta*
85+
"""
86+
Signed, length *delta*
8487
85-
Read *delta* bytes, returning None if *delta* is zero, and
86-
the bytes interpreted as a signed integer otherwise."""
88+
Read *delta* bytes, returning None if *delta* is zero, and the bytes
89+
interpreted as a signed integer otherwise.
90+
"""
8791
if delta == 0:
8892
return None
8993
return dvi._arg(delta, True)
9094

9195

9296
def _arg_slen1(dvi, delta):
93-
"""Signed, length *delta*+1
97+
"""
98+
Signed, length *delta*+1
9499
95-
Read *delta*+1 bytes, returning the bytes interpreted as signed."""
100+
Read *delta*+1 bytes, returning the bytes interpreted as signed.
101+
"""
96102
return dvi._arg(delta+1, True)
97103

98104

99105
def _arg_ulen1(dvi, delta):
100-
"""Unsigned length *delta*+1
106+
"""
107+
Unsigned length *delta*+1
101108
102-
Read *delta*+1 bytes, returning the bytes interpreted as unsigned."""
109+
Read *delta*+1 bytes, returning the bytes interpreted as unsigned.
110+
"""
103111
return dvi._arg(delta+1, False)
104112

105113

106114
def _arg_olen1(dvi, delta):
107-
"""Optionally signed, length *delta*+1
115+
"""
116+
Optionally signed, length *delta*+1
108117
109118
Read *delta*+1 bytes, returning the bytes interpreted as
110-
unsigned integer for 0<=*delta*<3 and signed if *delta*==3."""
119+
unsigned integer for 0<=*delta*<3 and signed if *delta*==3.
120+
"""
111121
return dvi._arg(delta + 1, delta == 3)
112122

113123

@@ -122,7 +132,8 @@ def _arg_olen1(dvi, delta):
122132

123133

124134
def _dispatch(table, min, max=None, state=None, args=('raw',)):
125-
"""Decorator for dispatch by opcode. Sets the values in *table*
135+
"""
136+
Decorator for dispatch by opcode. Sets the values in *table*
126137
from *min* to *max* to this method, adds a check that the Dvi state
127138
matches *state* if not None, reads arguments from the file according
128139
to *args*.

0 commit comments

Comments
 (0)