Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d103e97

Browse files
committed
lint
1 parent 12dc5bc commit d103e97

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

lib/matplotlib/figure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,8 @@ def subplots_adjust(self, left=None, bottom=None, right=None, top=None,
12901290
"incompatible with subplots_adjust and/or tight_layout; "
12911291
"not calling subplots_adjust.")
12921292
return
1293-
self.subplotpars.update(left, bottom, right, top, wspace, hspace, rc_default = rc_default)
1293+
self.subplotpars.update(left, bottom, right, top, wspace, hspace,
1294+
rc_default=rc_default)
12941295
for ax in self.axes:
12951296
if ax.get_subplotspec() is not None:
12961297
ax._set_position(ax.get_subplotspec().get_position(self))

lib/matplotlib/gridspec.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
methods like `~.pyplot.subplots`, `~.pyplot.subplot_mosaic` and
1010
`~.Figure.subfigures`. See the tutorial :ref:`arranging_axes` for a guide.
1111
"""
12-
12+
from typing import Any
1313
import copy
1414
import logging
1515
from numbers import Integral
@@ -723,7 +723,6 @@ def subgridspec(self, nrows, ncols, **kwargs):
723723
return GridSpecFromSubplotSpec(nrows, ncols, self, **kwargs)
724724

725725

726-
727726
class SubplotParams:
728727
"""
729728
Parameters defining the positioning of a subplots grid in a figure.
@@ -761,10 +760,11 @@ def __init__(self, left=None, bottom=None, right=None, top=None,
761760

762761
def _repr_pretty_(self, p: Any, cycle: bool) -> None:
763762
del cycle
764-
s = f"{self.__class__.__name__}(left={self.left}, bottom={self.bottom}, right={self.right}, top={self.top}, "
765-
s += f"wspace={self.wspace}, hspace={self.hspace})"
763+
name = self.__class__.__name__
764+
s = f"{name}(left={self.left}, bottom={self.bottom}, right={self.right}, "
765+
s += f" top={self.top}, wspace={self.wspace}, hspace={self.hspace})"
766766
p.text(s)
767-
767+
768768
def update(self, left=None, bottom=None, right=None, top=None,
769769
wspace=None, hspace=None, rc_default=False):
770770
"""
@@ -778,7 +778,8 @@ def update(self, left=None, bottom=None, right=None, top=None,
778778
>= (top if top is not None else self.top)):
779779
raise ValueError('bottom cannot be >= top')
780780

781-
attributes = {'left': left, 'right': right, 'bottom': bottom, 'top': top, 'hspace': hspace, 'wspace': wspace}
781+
attributes = {'left': left, 'right': right, 'bottom': bottom, 'top': top,
782+
'hspace': hspace, 'wspace': wspace}
782783
for key, value in attributes.items():
783784
if value is None:
784785
if rc_default:

0 commit comments

Comments
 (0)