
    Je                     J    d Z ddlZddlmZmZ  ej
                  e      Zd Zy)z
binaryornot.check
-----------------

Main code for checking if a file is binary or text.

Adapted from binaryornot/check.py of
`BinaryOrNot <https://github.com/audreyr/binaryornot>`_.
    N)get_starting_chunkis_binary_stringc                     t         j                  dt                      g d}|D ]  }| j                  |      s y t	        |       }t        |      S )zd
    :param filename: File to check.
    :returns: True if it's a binary file, otherwise False.
    zis_binary: %(filename)r)pycisozippdfT)loggerdebuglocalsendswithr   r   )filenamebinary_extensionsextchunks       I/usr/lib/python3/dist-packages/spyder/utils/external/binaryornot/check.py	is_binaryr      sT    
 LL*FH5 5  S!
 x(EE""    )	__doc__logging)spyder.utils.external.binaryornot.helpersr   r   	getLogger__name__r
   r    r   r   <module>r      s+     Z 
		8	$#r   