@@ -141,21 +141,22 @@ class StandardReportWithExclusions(pep8.StandardReport):
141
141
'*/matplotlib/projections/__init__.py' ,
142
142
'*/matplotlib/projections/geo.py' ,
143
143
'*/matplotlib/projections/polar.py' ]
144
-
144
+
145
145
#: A class attribute to store the lines of failing tests.
146
146
_global_deferred_print = []
147
-
147
+
148
148
#: A class attribute to store patterns which have seen exceptions.
149
149
matched_exclusions = set ()
150
-
150
+
151
151
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).
153
154
if not self ._deferred_print :
154
155
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.
159
160
for pattern in self .expected_bad_files :
160
161
if fnmatch (self .filename , pattern ):
161
162
self .matched_exclusions .add (pattern )
@@ -168,18 +169,17 @@ def get_file_results(self):
168
169
self .file_errors -= 1
169
170
self .total_errors -= 1
170
171
return self .file_errors
171
-
172
+
172
173
# mirror the content of StandardReport, only storing the output to
173
174
# file rather than printing. This could be a feature request for
174
175
# the PEP8 tool.
175
176
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 :
177
178
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 })
183
183
return self .file_errors
184
184
185
185
@@ -207,9 +207,9 @@ def test_pep8_conformance():
207
207
reporter = pep8style .options .reporter
208
208
209
209
# 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' ) )
213
213
214
214
# Support for egg shared object wrappers, which are not PEP8 compliant,
215
215
# nor part of the matplotlib repository.
0 commit comments