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

Skip to content

Commit c664fb0

Browse files
committed
Fix overindented lines.
This is basically pycodestyle's E127 check, except that pycodestyle is incorrectly too strict in a few places so we can't enforce it automatically.
1 parent 70d59ae commit c664fb0

24 files changed

Lines changed: 80 additions & 89 deletions

examples/images_contours_and_fields/tricontour_smooth_delaunay.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ def experiment_res(x, y):
124124

125125
# 1) plot of the refined (computed) data contours:
126126
ax.tricontour(tri_refi, z_test_refi, levels=levels, cmap=cmap,
127-
linewidths=[2.0, 0.5, 1.0, 0.5])
127+
linewidths=[2.0, 0.5, 1.0, 0.5])
128128
# 2) plot of the expected (analytical) data contours (dashed):
129129
if plot_expected:
130130
ax.tricontour(tri_refi, z_expected, levels=levels, cmap=cmap,
131-
linestyles='--')
131+
linestyles='--')
132132
# 3) plot of the fine mesh on which interpolation was done:
133133
if plot_refi_tri:
134134
ax.triplot(tri_refi, color='0.97')

examples/images_contours_and_fields/tricontour_smooth_user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def function_z(x, y):
6969
cmap = cm.get_cmap(name='terrain', lut=None)
7070
ax.tricontourf(tri_refi, z_test_refi, levels=levels, cmap=cmap)
7171
ax.tricontour(tri_refi, z_test_refi, levels=levels,
72-
colors=['0.25', '0.5', '0.5', '0.5', '0.5'],
73-
linewidths=[1.0, 0.5, 0.5, 0.5, 0.5])
72+
colors=['0.25', '0.5', '0.5', '0.5', '0.5'],
73+
linewidths=[1.0, 0.5, 0.5, 0.5, 0.5])
7474

7575
ax.set_title("High-resolution tricontouring")
7676

lib/matplotlib/_cm.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,22 @@ def _g36(x): return 2 * x - 1
240240
(0.857143, 0.937500, 0.937500),
241241
(1.0, 0.09375, 0.09375))}
242242

243-
_jet_data = {'red': ((0., 0, 0), (0.35, 0, 0), (0.66, 1, 1), (0.89, 1, 1),
244-
(1, 0.5, 0.5)),
245-
'green': ((0., 0, 0), (0.125, 0, 0), (0.375, 1, 1), (0.64, 1, 1),
246-
(0.91, 0, 0), (1, 0, 0)),
247-
'blue': ((0., 0.5, 0.5), (0.11, 1, 1), (0.34, 1, 1),
248-
(0.65, 0, 0), (1, 0, 0))}
243+
_jet_data = {'red': ((0.00, 0, 0),
244+
(0.35, 0, 0),
245+
(0.66, 1, 1),
246+
(0.89, 1, 1),
247+
(1.00, 0.5, 0.5)),
248+
'green': ((0.000, 0, 0),
249+
(0.125, 0, 0),
250+
(0.375, 1, 1),
251+
(0.640, 1, 1),
252+
(0.910, 0, 0),
253+
(1.000, 0, 0)),
254+
'blue': ((0.00, 0.5, 0.5),
255+
(0.11, 1, 1),
256+
(0.34, 1, 1),
257+
(0.65, 0, 0),
258+
(1.00, 0, 0))}
249259

250260
_pink_data = {'red': ((0., 0.1178, 0.1178), (0.015873, 0.195857, 0.195857),
251261
(0.031746, 0.250661, 0.250661),

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ def get_title(self, loc="center"):
115115
title = cbook._check_getitem(titles, loc=loc.lower())
116116
return title.get_text()
117117

118-
def set_title(self, label, fontdict=None, loc=None, pad=None,
119-
**kwargs):
118+
def set_title(self, label, fontdict=None, loc=None, pad=None, **kwargs):
120119
"""
121120
Set a title for the axes.
122121
@@ -1418,8 +1417,8 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
14181417

14191418
colls = []
14201419
for position, lineoffset, linelength, linewidth, color, linestyle in \
1421-
zip(positions, lineoffsets, linelengths, linewidths,
1422-
colors, linestyles):
1420+
zip(positions, lineoffsets, linelengths, linewidths,
1421+
colors, linestyles):
14231422
coll = mcoll.EventCollection(position,
14241423
orientation=orientation,
14251424
lineoffset=lineoffset,
@@ -8102,7 +8101,7 @@ def violin(self, vpstats, positions=None, vert=True, widths=0.5,
81028101
ppmaxs = np.concatenate((ppmaxs, [cmax] * np.size(q)))
81038102
# Start rendering
81048103
artists['cquantiles'] = perp_lines(quantiles, ppmins, ppmaxs,
8105-
colors=edgecolor)
8104+
colors=edgecolor)
81068105

81078106
return artists
81088107

lib/matplotlib/axes/_secondary_axes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ class SecondaryAxis(_AxesBase):
3939
General class to hold a Secondary_X/Yaxis.
4040
"""
4141

42-
def __init__(self, parent, orientation,
43-
location, functions, **kwargs):
42+
def __init__(self, parent, orientation, location, functions, **kwargs):
4443
"""
4544
See `.secondary_xaxis` and `.secondary_yaxis` for the doc string.
4645
While there is no need for this to be private, it should really be

lib/matplotlib/axis.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,10 @@ def get_view_interval(self):
346346

347347
def _apply_params(self, **kw):
348348
for name, target in [("gridOn", self.gridline),
349-
("tick1On", self.tick1line),
350-
("tick2On", self.tick2line),
351-
("label1On", self.label1),
352-
("label2On", self.label2)]:
349+
("tick1On", self.tick1line),
350+
("tick2On", self.tick2line),
351+
("label1On", self.label1),
352+
("label2On", self.label2)]:
353353
if name in kw:
354354
target.set_visible(kw.pop(name))
355355
if any(k in kw for k in ['size', 'width', 'pad', 'tickdir']):

lib/matplotlib/backends/qt_editor/_formlayout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,4 +566,4 @@ def apply_test(data):
566566
print("result:", fedit(((datagroup, "Title 1", "Tab 1 comment"),
567567
(datalist, "Title 2", "Tab 2 comment"),
568568
(datalist, "Title 3", "Tab 3 comment")),
569-
"Global title"))
569+
"Global title"))

lib/matplotlib/figure.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,9 @@ def __init__(self,
257257
edgecolor=None,
258258
linewidth=0.0,
259259
frameon=None,
260-
subplotpars=None, # default to rc
261-
tight_layout=None, # default to rc figure.autolayout
262-
constrained_layout=None, # default to rc
263-
#figure.constrained_layout.use
260+
subplotpars=None, # rc figure.subplot.*
261+
tight_layout=None, # rc figure.autolayout
262+
constrained_layout=None, # rc figure.constrained_layout.use
264263
):
265264
"""
266265
Parameters

lib/matplotlib/mathtext.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2713,7 +2713,7 @@ def symbol(self, s, loc, toks):
27132713
return [Hlist([self._make_space(0.2),
27142714
char,
27152715
self._make_space(0.2)],
2716-
do_kern = True)]
2716+
do_kern=True)]
27172717
elif c in self._punctuation_symbols:
27182718

27192719
# Do not space commas between brackets
@@ -2727,9 +2727,7 @@ def symbol(self, s, loc, toks):
27272727
if c == '.' and s[loc - 1].isdigit() and s[loc + 1].isdigit():
27282728
return [char]
27292729
else:
2730-
return [Hlist([char,
2731-
self._make_space(0.2)],
2732-
do_kern = True)]
2730+
return [Hlist([char, self._make_space(0.2)], do_kern=True)]
27332731
return [char]
27342732

27352733
accentprefixed = symbol

lib/matplotlib/projections/polar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ def draw(self, *args, **kwargs):
900900
if thetamin > thetamax:
901901
thetamin, thetamax = thetamax, thetamin
902902
rmin, rmax = ((self._realViewLim.intervaly - self.get_rorigin()) *
903-
self.get_rsign())
903+
self.get_rsign())
904904
if isinstance(self.patch, mpatches.Wedge):
905905
# Backwards-compatibility: Any subclassed Axes might override the
906906
# patch to not be the Wedge that PolarAxes uses.

0 commit comments

Comments
 (0)