@@ -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.
0 commit comments