Ticket #100: unused_variables.patch

File unused_variables.patch, 1.4 KB (added by anonymous, 5 years ago)
  • C:/projects/workspace_python/PyYAML_2/lib/yaml/scanner.py

     
    12811281        chunks = [] 
    12821282        start_mark = self.get_mark() 
    12831283        end_mark = start_mark 
    1284         indent = self.indent+1 
    12851284        # We allow zero indentation for scalars, but then we need to check for 
    12861285        # document separators at the beginning of the line. 
    12871286        #if indent == 0: 
     
    13131312            chunks.append(self.prefix(length)) 
    13141313            self.forward(length) 
    13151314            end_mark = self.get_mark() 
    1316             spaces = self.scan_plain_spaces(indent, start_mark) 
     1315            spaces = self.scan_plain_spaces() 
    13171316            if not spaces or self.peek() == u'#' \ 
    1318                     or (not self.flow_level and self.column < indent): 
     1317                    or (not self.flow_level and self.column < self.indent+1): 
    13191318                break 
    13201319        return ScalarToken(u''.join(chunks), True, start_mark, end_mark) 
    13211320 
    1322     def scan_plain_spaces(self, indent, start_mark): 
     1321    def scan_plain_spaces(self): 
    13231322        # See the specification for details. 
    13241323        # The specification is really confusing about tabs in plain scalars. 
    13251324        # We just forbid them completely. Do not use tabs in YAML!