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

Skip to content

Commit c2c13ff

Browse files
committed
lint
1 parent 035a9c0 commit c2c13ff

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
@@ -728,7 +728,6 @@ def subgridspec(self, nrows, ncols, **kwargs):
728728
return GridSpecFromSubplotSpec(nrows, ncols, self, **kwargs)
729729

730730

731-
732731
class SubplotParams:
733732
"""
734733
Parameters defining the positioning of a subplots grid in a figure.
@@ -766,10 +765,11 @@ def __init__(self, left=None, bottom=None, right=None, top=None,
766765

767766
def _repr_pretty_(self, p: Any, cycle: bool) -> None:
768767
del cycle
769-
s = f"{self.__class__.__name__}(left={self.left}, bottom={self.bottom}, right={self.right}, top={self.top}, "
770-
s += f"wspace={self.wspace}, hspace={self.hspace})"
768+
name = self.__class__.__name__
769+
s = f"{name}(left={self.left}, bottom={self.bottom}, right={self.right}, "
770+
s += f" top={self.top}, wspace={self.wspace}, hspace={self.hspace})"
771771
p.text(s)
772-
772+
773773
def update(self, left=None, bottom=None, right=None, top=None,
774774
wspace=None, hspace=None, rc_default=False):
775775
"""
@@ -783,7 +783,8 @@ def update(self, left=None, bottom=None, right=None, top=None,
783783
>= (top if top is not None else self.top)):
784784
raise ValueError('bottom cannot be >= top')
785785

786-
attributes = {'left': left, 'right': right, 'bottom': bottom, 'top': top, 'hspace': hspace, 'wspace': wspace}
786+
attributes = {'left': left, 'right': right, 'bottom': bottom, 'top': top,
787+
'hspace': hspace, 'wspace': wspace}
787788
for key, value in attributes.items():
788789
if value is None:
789790
if rc_default:

0 commit comments

Comments
 (0)