autoflake.py
def _detect_encoding(readline):
    """Return file encoding."""
    try:
        from lib2to3.pgen2 import tokenize as lib2to3_tokenize
        encoding = lib2to3_tokenize.detect_encoding(readline)[0]
        return encoding
    except (LookupError, SyntaxError, UnicodeDecodeError):
        return 'latin-1'
def _detect_encoding(readline):
    """Return file encoding."""
    try:
        from lib2to3.pgen2 import tokenize as lib2to3_tokenize
        encoding = lib2to3_tokenize.detect_encoding(readline)[0]
        return encoding
    except (LookupError, SyntaxError, UnicodeDecodeError):
        return 'latin-1'
def _detect_encoding ( readline ) : try : from lib2to3 . pgen2 import tokenize as lib2to3_tokenize encoding = lib2to3_tokenize . detect_encoding ( readline ) [ 0 ] return encoding except ( LookupError , SyntaxError , UnicodeDecodeError ) : return 'latin-1'
Return file encoding.
Return file encoding .