
    f j                     J    d Z ddlmZ dedeedf         deedf         fdZdS )	zStage 2a: Byte sequence validity filtering.

Note: ``from __future__ import annotations`` is intentionally omitted because
this module is compiled with mypyc, which does not support PEP 563 string
annotations.
    )EncodingInfodata
candidates.returnc                     | s|S g }|D ]K}	 |                      |j        d           |                    |           5# t          t          f$ r Y Hw xY wt          |          S )zFilter candidates to only those where *data* decodes without errors.

    :param data: The raw byte data to test.
    :param candidates: Encoding candidates to validate.
    :returns: The subset of *candidates* that can decode *data*.
    strict)errors)decodenameappendUnicodeDecodeErrorLookupErrortuple)r   r   validencs       mC:\Users\Terasoftware\OneDrive\Desktop\faahhh\fyndo\fyndo\venv\Lib\site-packages\chardet/pipeline/validity.pyfilter_by_validityr      s      E  	KKK222LL"K0 	 	 	H	<<s   1>AAN)__doc__chardet.registryr   bytesr   r        r   <module>r      sm     * ) ) ) ) )
"<#45
<     r   