Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cranky pep8 #2930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
bitrate = rcParams['animation.bitrate']

all_anim = [self]
if not extra_anim is None:
if extra_anim is not None:
all_anim.extend(anim
for anim
in extra_anim if anim._fig is self._fig)
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def _xy_from_xy(self, x, y):

def _makeline(self, x, y, kw, kwargs):
kw = kw.copy() # Don't modify the original kw.
if not 'color' in kw and not 'color' in kwargs:
if 'color' not in kw and 'color' not in kwargs:
kw['color'] = six.next(self.color_cycle)
# (can't use setdefault because it always evaluates
# its second argument)
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ def set_array(self, *args):
raise NotImplementedError('Method not supported')

def set_interpolation(self, s):
if s is not None and not s in ('nearest', 'bilinear'):
if s is not None and s not in ('nearest', 'bilinear'):
raise NotImplementedError('Only nearest neighbor and '
'bilinear interpolations are supported')
AxesImage.set_interpolation(self, s)
Expand Down
18 changes: 16 additions & 2 deletions 18 lib/matplotlib/tests/test_coding_standards.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,22 @@
'_backend_gdk.py',
'pyparsing*',
'_qhull.py']
PEP8_ADDITIONAL_IGNORE = ('E121', 'E122', 'E123', 'E124', 'E125',
'E126', 'E127', 'E128')

PEP8_ADDITIONAL_IGNORE = ['E111',
'E112',
'E113',
'E121',
'E122',
'E123',
'E124',
'E125',
'E126',
'E127',
'E128',
'E129',
'E131',
'E265']

EXPECTED_BAD_FILES = ['*/matplotlib/__init__.py',
'*/matplotlib/_cm.py',
'*/matplotlib/_mathtext_data.py',
Expand Down
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/textpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def get_glyphs_with_font(self, font, s, glyph_map=None,
horiz_advance = (glyph.linearHoriAdvance / 65536.0)

char_id = self._get_char_id(font, ccode)
if not char_id in glyph_map:
if char_id not in glyph_map:
glyph_map_new[char_id] = self.glyph_to_path(font)

currx += (kern / 64.0)
Expand Down Expand Up @@ -258,7 +258,7 @@ def get_glyphs_mathtext(self, prop, s, glyph_map=None,
currx, curry = 0, 0
for font, fontsize, ccode, ox, oy in glyphs:
char_id = self._get_char_id(font, ccode)
if not char_id in glyph_map:
if char_id not in glyph_map:
font.clear()
font.set_size(self.FONT_SCALE, self.DPI)
glyph = font.load_char(ccode, flags=LOAD_NO_HINTING)
Expand Down Expand Up @@ -371,7 +371,7 @@ def get_glyphs_tex(self, prop, s, glyph_map=None,

char_id = self._get_char_id_ps(font, glyph)

if not char_id in glyph_map:
if char_id not in glyph_map:
font.clear()
font.set_size(self.FONT_SCALE, self.DPI)
if enc:
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.