Skip to content

Commit 1048430

Browse files
authored
Merge pull request matplotlib#17901 from Carreau/velin-II
DOC: Autoreformating of backend/*.py
2 parents 5f84e79 + 919c59a commit 1048430

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

lib/matplotlib/backends/backend_agg.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,16 +550,13 @@ def print_jpg(self, filename_or_obj, *args, dryrun=False, pil_kwargs=None,
550550
the JPEG compression algorithm, and results in large files
551551
with hardly any gain in image quality. This parameter is
552552
deprecated.
553-
554553
optimize : bool, default: False
555554
Whether the encoder should make an extra pass over the image
556555
in order to select optimal encoder settings. This parameter is
557556
deprecated.
558-
559557
progressive : bool, default: False
560558
Whether the image should be stored as a progressive JPEG file.
561559
This parameter is deprecated.
562-
563560
pil_kwargs : dict, optional
564561
Additional keyword arguments that are passed to
565562
`PIL.Image.Image.save` when saving the figure. These take

lib/matplotlib/backends/backend_mixed.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,16 @@ def __init__(self, figure, width, height, dpi, vector_renderer,
2121
----------
2222
figure : `matplotlib.figure.Figure`
2323
The figure instance.
24-
2524
width : scalar
2625
The width of the canvas in logical units
27-
2826
height : scalar
2927
The height of the canvas in logical units
30-
3128
dpi : float
3229
The dpi of the canvas
33-
3430
vector_renderer : `matplotlib.backend_bases.RendererBase`
3531
An instance of a subclass of
3632
`~matplotlib.backend_bases.RendererBase` that will be used for the
3733
vector drawing.
38-
3934
raster_renderer_class : `matplotlib.backend_bases.RendererBase`
4035
The renderer class to use for the raster drawing. If not provided,
4136
this will use the Agg backend (which is currently the only viable

lib/matplotlib/backends/backend_pdf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def _create_pdf_info_dict(backend, metadata):
150150
----------
151151
backend : str
152152
The name of the backend to use in the Producer value.
153+
153154
metadata : Dict[str, Union[str, datetime, Name]]
154155
A dictionary of metadata supplied by the user with information
155156
following the PDF specification, also defined in
@@ -474,7 +475,6 @@ def __init__(self, id, len, file, extra=None, png=None):
474475
"""
475476
Parameters
476477
----------
477-
478478
id : int
479479
Object id of the stream.
480480
len : Reference or None
@@ -608,9 +608,9 @@ def __init__(self, filename, metadata=None):
608608
"""
609609
Parameters
610610
----------
611-
612611
filename : str or path-like or file-like
613612
Output target; if a string, a file will be opened for writing.
613+
614614
metadata : dict from strings to strings and dates
615615
Information dictionary object (see PDF reference section 10.2.1
616616
'Document Information Dictionary'), e.g.:
@@ -2568,9 +2568,11 @@ def __init__(self, filename, keep_empty=True, metadata=None):
25682568
Plots using `PdfPages.savefig` will be written to a file at this
25692569
location. The file is opened at once and any older file with the
25702570
same name is overwritten.
2571+
25712572
keep_empty : bool, optional
25722573
If set to False, then empty pdf files will be deleted automatically
25732574
when closed.
2575+
25742576
metadata : dict, optional
25752577
Information dictionary object (see PDF reference section 10.2.1
25762578
'Document Information Dictionary'), e.g.:

lib/matplotlib/backends/backend_pgf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,9 +1024,11 @@ def __init__(self, filename, *, keep_empty=True, metadata=None):
10241024
filename : str or path-like
10251025
Plots using `PdfPages.savefig` will be written to a file at this
10261026
location. Any older file with the same name is overwritten.
1027+
10271028
keep_empty : bool, default: True
10281029
If set to False, then empty pdf files will be deleted automatically
10291030
when closed.
1031+
10301032
metadata : dict, optional
10311033
Information dictionary object (see PDF reference section 10.2.1
10321034
'Document Information Dictionary'), e.g.:

lib/matplotlib/backends/backend_svg.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def end(self, tag=None, indent=True):
198198
tag
199199
Element tag. If given, the tag must match the start tag. If
200200
omitted, the current element is closed.
201-
"""
201+
"""
202202
if tag:
203203
assert self.__tags, "unbalanced end(%s)" % tag
204204
assert escape_cdata(tag) == self.__tags[-1], \
@@ -1041,11 +1041,11 @@ def _draw_text_as_path(self, gc, x, y, s, prop, angle, ismath, mtext=None):
10411041
Parameters
10421042
----------
10431043
s : str
1044-
text to be converted
1044+
text to be converted
10451045
prop : `matplotlib.font_manager.FontProperties`
1046-
font property
1046+
font property
10471047
ismath : bool
1048-
If True, use mathtext parser. If "TeX", use *usetex* mode.
1048+
If True, use mathtext parser. If "TeX", use *usetex* mode.
10491049
"""
10501050
writer = self.writer
10511051

@@ -1292,6 +1292,7 @@ def print_svg(self, filename, *args, **kwargs):
12921292
----------
12931293
filename : str or path-like or file-like
12941294
Output target; if a string, a file will be opened for writing.
1295+
12951296
metadata : Dict[str, Any], optional
12961297
Metadata in the SVG file defined as key-value pairs of strings,
12971298
datetimes, or lists of strings, e.g., ``{'Creator': 'My software',

lib/matplotlib/backends/qt_editor/_formlayout.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ def __init__(self, data, comment="", with_margin=False, parent=None):
217217
data : list of (label, value) pairs
218218
The data to be edited in the form.
219219
comment : str, optional
220-
221220
with_margin : bool, default: False
222221
If False, the form elements reach to the border of the widget.
223222
This is the desired behavior if the FormWidget is used as a widget

0 commit comments

Comments
 (0)