original_docstring: Check if we should remove lines, then do it.
      Return the numner of lines removed.
      
docstring: Check if we should remove lines, then do it.
  Return the numner of lines removed.
docstring_tokens: Check if we should remove lines then do it . Return the numner of lines removed .
code: def remove_lines(fname, entries):
      """Check if we should remove lines, then do it.
      Return the numner of lines removed.
      """
      to_remove = []
      for entry in entries:
          msg, issue, lineno, pos, descr = entry
          # 'module imported but not used'
          if issue == 'F401' and handle_f401(fname, lineno):
              to_remove.append(lineno)
          # 'blank line(s) at end of file'
          elif issue == 'W391':
              lines = read_lines(fname)
              i = len(lines) - 1
              while lines[i] == '\n':
                  to_remove.append(i + 1)
                  i -= 1
          # 'too many blank lines'
          elif issue == 'E303':
              howmany = descr.replace('(', '').replace(')', '')
              howmany = int(howmany[-1])
              for x in range(lineno - howmany, lineno):
                  to_remove.append(x)
  
      if to_remove:
          newlines = []
          for i, line in enumerate(read_lines(fname), 1):
              if i not in to_remove:
                  newlines.append(line)
          print("removing line(s) from %s" % fname)
          write_file(fname, newlines)
  
      return len(to_remove)
code_tokens: def remove_lines ( fname , entries ) : to_remove = [ ] for entry in entries : msg , issue , lineno , pos , descr = entry if issue == 'F401' and handle_f401 ( fname , lineno ) : to_remove . append ( lineno ) elif issue == 'W391' : lines = read_lines ( fname ) i = len ( lines ) - 1 while lines [ i ] == '\n' : to_remove . append ( i + 1 ) i -= 1 elif issue == 'E303' : howmany = descr . replace ( '(' , '' ) . replace ( ')' , '' ) howmany = int ( howmany [ - 1 ] ) for x in range ( lineno - howmany , lineno ) : to_remove . append ( x ) if to_remove : newlines = [ ] for i , line in enumerate ( read_lines ( fname ) , 1 ) : if i not in to_remove : newlines . append ( line ) print ( "removing line(s) from %s" % fname ) write_file ( fname , newlines ) return len ( to_remove )
short_docstring: Check if we should remove lines, then do it.
short_docstring_tokens: Check if we should remove lines then do it .
comment: """Check if we should remove lines, then do it.
      Return the numner of lines removed.
      """$SEP$# 'module imported but not used'$SEP$# 'blank line(s) at end of file'$SEP$# 'too many blank lines'