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

Skip to content

Commit a3bd6ba

Browse files
authored
Merge pull request matplotlib#14201 from anntzer/e124
STY: Fix E124 flake8 violations (closing bracket indentation).
2 parents 8f6c598 + fb3ddbf commit a3bd6ba

File tree

11 files changed

+119
-125
lines changed

11 files changed

+119
-125
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ignore =
33
# Normal default
44
E121,E123,E126,E226,E24,E704,W503,W504,
55
# Additional ignores:
6-
E122, E124, E125, E127, E128, E129, E131,
6+
E122, E125, E127, E128, E129, E131,
77
E265, E266,
88
E305, E306,
99
E722, E741,

examples/color/custom_cmap.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -104,47 +104,47 @@
104104
# --- Custom colormaps ---
105105

106106
cdict1 = {'red': ((0.0, 0.0, 0.0),
107-
(0.5, 0.0, 0.1),
108-
(1.0, 1.0, 1.0)),
107+
(0.5, 0.0, 0.1),
108+
(1.0, 1.0, 1.0)),
109109

110-
'green': ((0.0, 0.0, 0.0),
111-
(1.0, 0.0, 0.0)),
110+
'green': ((0.0, 0.0, 0.0),
111+
(1.0, 0.0, 0.0)),
112112

113-
'blue': ((0.0, 0.0, 1.0),
114-
(0.5, 0.1, 0.0),
115-
(1.0, 0.0, 0.0))
116-
}
113+
'blue': ((0.0, 0.0, 1.0),
114+
(0.5, 0.1, 0.0),
115+
(1.0, 0.0, 0.0))
116+
}
117117

118118
cdict2 = {'red': ((0.0, 0.0, 0.0),
119-
(0.5, 0.0, 1.0),
120-
(1.0, 0.1, 1.0)),
119+
(0.5, 0.0, 1.0),
120+
(1.0, 0.1, 1.0)),
121121

122-
'green': ((0.0, 0.0, 0.0),
123-
(1.0, 0.0, 0.0)),
122+
'green': ((0.0, 0.0, 0.0),
123+
(1.0, 0.0, 0.0)),
124124

125-
'blue': ((0.0, 0.0, 0.1),
126-
(0.5, 1.0, 0.0),
127-
(1.0, 0.0, 0.0))
128-
}
125+
'blue': ((0.0, 0.0, 0.1),
126+
(0.5, 1.0, 0.0),
127+
(1.0, 0.0, 0.0))
128+
}
129129

130130
cdict3 = {'red': ((0.0, 0.0, 0.0),
131131
(0.25, 0.0, 0.0),
132132
(0.5, 0.8, 1.0),
133133
(0.75, 1.0, 1.0),
134134
(1.0, 0.4, 1.0)),
135135

136-
'green': ((0.0, 0.0, 0.0),
137-
(0.25, 0.0, 0.0),
138-
(0.5, 0.9, 0.9),
139-
(0.75, 0.0, 0.0),
140-
(1.0, 0.0, 0.0)),
141-
142-
'blue': ((0.0, 0.0, 0.4),
143-
(0.25, 1.0, 1.0),
144-
(0.5, 1.0, 0.8),
145-
(0.75, 0.0, 0.0),
146-
(1.0, 0.0, 0.0))
147-
}
136+
'green': ((0.0, 0.0, 0.0),
137+
(0.25, 0.0, 0.0),
138+
(0.5, 0.9, 0.9),
139+
(0.75, 0.0, 0.0),
140+
(1.0, 0.0, 0.0)),
141+
142+
'blue': ((0.0, 0.0, 0.4),
143+
(0.25, 1.0, 1.0),
144+
(0.5, 1.0, 0.8),
145+
(0.75, 0.0, 0.0),
146+
(1.0, 0.0, 0.0))
147+
}
148148

149149
# Make a modified version of cdict3 with some transparency
150150
# in the middle of the range.

examples/images_contours_and_fields/contour_demo.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@
5151
# You can force all the contours to be the same color.
5252

5353
fig, ax = plt.subplots()
54-
CS = ax.contour(X, Y, Z, 6,
55-
colors='k', # negative contours will be dashed by default
56-
)
54+
CS = ax.contour(X, Y, Z, 6, colors='k') # Negative contours default to dashed.
5755
ax.clabel(CS, fontsize=9, inline=1)
5856
ax.set_title('Single color - negative contours dashed')
5957

@@ -62,9 +60,7 @@
6260

6361
matplotlib.rcParams['contour.negative_linestyle'] = 'solid'
6462
fig, ax = plt.subplots()
65-
CS = ax.contour(X, Y, Z, 6,
66-
colors='k', # negative contours will be dashed by default
67-
)
63+
CS = ax.contour(X, Y, Z, 6, colors='k') # Negative contours default to dashed.
6864
ax.clabel(CS, fontsize=9, inline=1)
6965
ax.set_title('Single color - negative contours solid')
7066

@@ -74,9 +70,9 @@
7470

7571
fig, ax = plt.subplots()
7672
CS = ax.contour(X, Y, Z, 6,
77-
linewidths=np.arange(.5, 4, .5),
78-
colors=('r', 'green', 'blue', (1, 1, 0), '#afeeee', '0.5')
79-
)
73+
linewidths=np.arange(.5, 4, .5),
74+
colors=('r', 'green', 'blue', (1, 1, 0), '#afeeee', '0.5'),
75+
)
8076
ax.clabel(CS, fontsize=9, inline=1)
8177
ax.set_title('Crazy lines')
8278

lib/matplotlib/backends/backend_gtk3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,8 @@ def __init__(self,
629629
Gtk.STOCK_SAVE, Gtk.ResponseType.OK),
630630
path = None,
631631
filetypes = [],
632-
default_filetype = None
633-
):
632+
default_filetype = None,
633+
):
634634
super().__init__(title, parent, action, buttons)
635635
self.set_default_response(Gtk.ResponseType.OK)
636636
self.set_do_overwrite_confirmation(True)

lib/matplotlib/fontconfig_pattern.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -74,38 +74,38 @@ def __init__(self):
7474
(value_punc, value_punc)) \
7575
.setParseAction(self._value)
7676

77-
families =(family
78-
+ ZeroOrMore(
79-
Literal(',')
80-
+ family)
81-
).setParseAction(self._families)
82-
83-
point_sizes =(size
84-
+ ZeroOrMore(
85-
Literal(',')
86-
+ size)
87-
).setParseAction(self._point_sizes)
88-
89-
property =( (name
90-
+ Suppress(Literal('='))
91-
+ value
92-
+ ZeroOrMore(
93-
Suppress(Literal(','))
94-
+ value)
95-
)
96-
| name
97-
).setParseAction(self._property)
98-
99-
pattern =(Optional(
100-
families)
101-
+ Optional(
102-
Literal('-')
103-
+ point_sizes)
104-
+ ZeroOrMore(
105-
Literal(':')
106-
+ property)
107-
+ StringEnd()
108-
)
77+
families = (family
78+
+ ZeroOrMore(
79+
Literal(',')
80+
+ family)
81+
).setParseAction(self._families)
82+
83+
point_sizes = (size
84+
+ ZeroOrMore(
85+
Literal(',')
86+
+ size)
87+
).setParseAction(self._point_sizes)
88+
89+
property = ((name
90+
+ Suppress(Literal('='))
91+
+ value
92+
+ ZeroOrMore(
93+
Suppress(Literal(','))
94+
+ value)
95+
)
96+
| name
97+
).setParseAction(self._property)
98+
99+
pattern = (Optional(
100+
families)
101+
+ Optional(
102+
Literal('-')
103+
+ point_sizes)
104+
+ ZeroOrMore(
105+
Literal(':')
106+
+ property)
107+
+ StringEnd()
108+
)
109109

110110
self._parser = pattern
111111
self.ParseException = ParseException

lib/matplotlib/patches.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3273,8 +3273,7 @@ def __init__(self, beginarrow=None, endarrow=None,
32733273
super().__init__()
32743274

32753275
def _get_arrow_wedge(self, x0, y0, x1, y1,
3276-
head_dist, cos_t, sin_t, linewidth
3277-
):
3276+
head_dist, cos_t, sin_t, linewidth):
32783277
"""
32793278
Return the paths for arrow heads. Since arrow lines are
32803279
drawn with capstyle=projected, The arrow goes beyond the

lib/matplotlib/rcsetup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,9 @@ def update_savefig_format(value):
526526
validate_ps_papersize = ValidateInStrings(
527527
'ps_papersize',
528528
['auto', 'letter', 'legal', 'ledger',
529-
'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9', 'a10',
530-
'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'b10',
531-
], ignorecase=True)
529+
'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9', 'a10',
530+
'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'b10',
531+
], ignorecase=True)
532532

533533

534534
def validate_ps_distiller(s):

lib/matplotlib/tests/test_colors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def test_light_source_shading_default():
552552
[1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00],
553553
[1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00],
554554
[1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00]]
555-
]).T
555+
]).T
556556

557557
assert_array_almost_equal(rgb, expect, decimal=2)
558558

@@ -609,7 +609,7 @@ def test_light_source_masked_shading():
609609
[1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00],
610610
[1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00],
611611
[1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00]],
612-
]).T
612+
]).T
613613

614614
assert_array_almost_equal(rgb, expect, decimal=2)
615615

0 commit comments

Comments
 (0)