8000 Improve rcsetup.py flake8 compliance. (#12543) · matplotlib/matplotlib@5e2e9c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e2e9c2

Browse files
hershentimhoffm
authored andcommitted
Improve rcsetup.py flake8 compliance. (#12543)
1 parent 2bd2e93 commit 5e2e9c2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ per-file-ignores =
4141
matplotlib/mathtext.py: E201, E202, E203, E211, E221, E222, E225, E251, E301, E402
4242
matplotlib/projections/geo.py: E203, E221, E502
4343
matplotlib/pylab.py: E501
44-
matplotlib/rcsetup.py: E203, E225, E501
44+
matplotlib/rcsetup.py: E501
4545
matplotlib/sphinxext/plot_directive.py: E402
4646
matplotlib/tests/test_mathtext.py: E501
4747
matplotlib/transforms.py: E201, E202, E203, E501

lib/matplotlib/rcsetup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ def f(s):
7474
if allow_stringlist:
7575
# Sometimes, a list of colors might be a single string
7676
# of single-letter colornames. So give that a shot.
77-
return [scalar_validator(v.strip()) for v in s if v.strip()]
77+
return [scalar_validator(v.strip())
78+
for v in s if v.strip()]
7879
else:
7980
raise
8081
# We should allow any generic sequence type, including generators,
@@ -207,7 +208,7 @@ def validate_int(s):
207208

208209
def validate_int_or_None(s):
209210
"""if not None, tries to validate as an int"""
210-
if s=='None':
211+
if s == 'None':
211212
s = None
212213
if s is None:
213214
return None
@@ -1024,7 +1025,7 @@ def _validate_linestyle(ls):
10241025
## patch props
10251026
'patch.linewidth': [1.0, validate_float], # line width in points
10261027
'patch.edgecolor': ['black', validate_color],
1027-
'patch.force_edgecolor' : [False, validate_bool],
1028+
'patch.force_edgecolor': [False, validate_bool],
10281029
'patch.facecolor': ['C0', validate_color], # first color in cycle
10291030
'patch.antialiased': [True, validate_bool], # antialiased (no jaggies)
10301031

0 commit comments

Comments
 (0)
0