Skip to content

Commit 24085ac

Browse files
committed
PEP8 : fixed all E71[3,4] failures
1 parent 2ee8617 commit 24085ac

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lib/matplotlib/animation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
685685
bitrate = rcParams['animation.bitrate']
686686

687687
all_anim = [self]
688-
if not extra_anim is None:
688+
if extra_anim is not None:
689689
all_anim.extend(anim
690690
for anim
691691
in extra_anim if anim._fig is self._fig)

lib/matplotlib/axes/_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def _xy_from_xy(self, x, y):
232232

233233
def _makeline(self, x, y, kw, kwargs):
234234
kw = kw.copy() # Don't modify the original kw.
235-
if not 'color' in kw and not 'color' in kwargs:
235+
if 'color' not in kw and 'color' not in kwargs:
236236
kw['color'] = six.next(self.color_cycle)
237237
# (can't use setdefault because it always evaluates
238238
# its second argument)

lib/matplotlib/image.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ def set_array(self, *args):
776776
raise NotImplementedError('Method not supported')
777777

778778
def set_interpolation(self, s):
779-
if s is not None and not s in ('nearest', 'bilinear'):
779+
if s is not None and s not in ('nearest', 'bilinear'):
780780
raise NotImplementedError('Only nearest neighbor and '
781781
'bilinear interpolations are supported')
782782
AxesImage.set_interpolation(self, s)

lib/matplotlib/textpath.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def get_glyphs_with_font(self, font, s, glyph_map=None,
209209
horiz_advance = (glyph.linearHoriAdvance / 65536.0)
210210

211211
char_id = self._get_char_id(font, ccode)
212-
if not char_id in glyph_map:
212+
if char_id not in glyph_map:
213213
glyph_map_new[char_id] = self.glyph_to_path(font)
214214

215215
currx += (kern / 64.0)
@@ -258,7 +258,7 @@ def get_glyphs_mathtext(self, prop, s, glyph_map=None,
258258
currx, curry = 0, 0
259259
for font, fontsize, ccode, ox, oy in glyphs:
260260
char_id = self._get_char_id(font, ccode)
261-
if not char_id in glyph_map:
261+
if char_id not in glyph_map:
262262
font.clear()
263263
font.set_size(self.FONT_SCALE, self.DPI)
264264
glyph = font.load_char(ccode, flags=LOAD_NO_HINTING)
@@ -371,7 +371,7 @@ def get_glyphs_tex(self, prop, s, glyph_map=None,
371371

372372
char_id = self._get_char_id_ps(font, glyph)
373373

374-
if not char_id in glyph_map:
374+
if char_id not in glyph_map:
375375
font.clear()
376376
font.set_size(self.FONT_SCALE, self.DPI)
377377
if enc:

0 commit comments

Comments
 (0)