Table of Contents

Module: Tabnanny eric3/Checks/Tabnanny.py

The Tab Nanny despises ambiguous indentation. She knows no mercy.

tabnanny
Detection of ambiguous indentation

For the time being this module is intended to be called as a script. However it is possible to import it into an IDE and use the function check() described below.

Warning: The API provided by this module is likely to change in future releases; such changes may not be backward compatible.

Imported modules   
import os
import sys
import tokenize
Functions   
check
errprint
format_witnesses
tokeneater
  check 
check ( file )

Private method to check one Python source file for whitespace related problems.

Arguments

file
source filename (string)

Returns

A tuple indicating status (1 = an error was found), the filename, the linenumber and the error message (boolean, string, string, string). The values are only valid, if the status equals 1.

  errprint 
errprint ( *args )

  format_witnesses 
format_witnesses ( w )

  tokeneater 
tokeneater (
        type,
        token,
        start,
        end,
        line,
        )

Exceptions   
NannyNag( start [ 0 ], msg, line )
Classes   

NannyNag

Raised by tokeneater() if detecting an ambiguous indent.

Whitespace


Table of Contents

This document was automatically generated by HappyDoc version 2.1