8000 Fixed failing PEP8 tests. · matplotlib/matplotlib@babd28a · GitHub
[go: up one dir, main page]

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

Commit babd28a

Browse files
committed
Fixed failing PEP8 tests.
1 parent 2f9f0dd commit babd28a

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

lib/matplotlib/tests/test_coding_standards.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -141,21 +141,22 @@ class StandardReportWithExclusions(pep8.StandardReport):
141141
'*/matplotlib/projections/__init__.py',
142142
'*/matplotlib/projections/geo.py',
143143
'*/matplotlib/projections/polar.py']
144-
144+
145145
#: A class attribute to store the lines of failing tests.
146146
_global_deferred_print = []
147-
147+
148148
#: A class attribute to store patterns which have seen exceptions.
149149
matched_exclusions = set()
150-
150+
151151
def get_file_results(self):
152-
# If the file had no errors, return self.file_errors (which will be 0)
152+
# If the file had no errors, return self.file_errors
153+
# (which will be 0).
153154
if not self._deferred_print:
154155
return self.file_errors
155-
156-
# Iterate over all of the patterns, to find a possible exclusion. If we
157-
# the filename is to be excluded, go ahead and remove the counts that
158-
# self.error added.
156+
157+
# Iterate over all of the patterns, to find a possible exclusion.
158+
# If the filename is to be excluded, go ahead and remove the
159+
# counts that self.error added.
159160
for pattern in self.expected_bad_files:
160161
if fnmatch(self.filename, pattern):
161162
self.matched_exclusions.add(pattern)
@@ -168,18 +169,17 @@ def get_file_results(self):
168169
self.file_errors -= 1
169170
self.total_errors -= 1
170171
return self.file_errors
171-
172+
172173
# mirror the content of StandardReport, only storing the output to
173174
# file rather than printing. This could be a feature request for
174175
# the PEP8 tool.
175176
self._deferred_print.sort()
176-
for line_number, offset, code, text, doc in self._deferred_print:
177+
for line_number, offset, code, text, _ in self._deferred_print:
177178
self._global_deferred_print.append(
178-
self._fmt % {
179-
'path': self.filename,
180-
'row': self.line_offset + line_number, 'col': offset + 1,
181-
'code': code, 'text': text,
182-
})
179+
self._fmt % {'path': self.filename,
180+
'row': self.line_offset + line_number,
181+
'col': offset + 1, 'code': code,
182+
'text': text})
183183
return self.file_errors
184184

185185

@@ -207,9 +207,9 @@ def test_pep8_conformance():
207207
reporter = pep8style.options.reporter
208208

209209
# Extend the number of PEP8 guidelines which are not checked.
210-
pep8style.options.ignore = pep8style.options.ignore + ('E121', 'E122',
211-
'E123', 'E124', 'E125', 'E126', 'E127',
212-
'E128')
210+
pep8style.options.ignore = (pep8style.options.ignore +
211+
('E121', 'E122', 'E123', 'E124', 'E125',
212+
'E126', 'E127', 'E128'))
213213

214214
# Support for egg shared object wrappers, which are not PEP8 compliant,
215215
# nor part of the matplotlib repository.

lib/matplotlib/tests/test_table.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
extensions=['png'],
88
remove_text=True)
99
def test_zorder():
10-
data = [[ 66386, 174296,],
11-
[ 58230, 381139,]]
10+
data = [[66386, 174296],
11+
[58230, 381139]]
1212

1313
colLabels = ('Freeze', 'Wind')
1414
rowLabels = ['%d year' % x for x in (100, 50)]
1515

16-
1716
cellText = []
1817
yoff = np.array([0.0] * len(colLabels))
1918
for row in reversed(data):

0 commit comments

Comments
 (0)
0