Cranky pep8 by tacaswell · Pull Request #2930 · matplotlib/matplotlib · GitHub
Skip to content
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 lib/matplotlib/animation.py
2 changes: 1 addition & 1 deletion 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 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 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 lib/matplotlib/textpath.py