usr/lib/python2.7/site-packages/pip/_vendor/chardet/escprober.pyo000064400000006237147205635210021003 0ustar00 abc@sxddlmZddlmZddlmZmZmZddlm Z m Z m Z m Z defdYZ dS(i(t CharSetProber(tCodingStateMachine(tLanguageFiltert ProbingStatet MachineState(t HZ_SM_MODELtISO2022CN_SM_MODELtISO2022JP_SM_MODELtISO2022KR_SM_MODELtEscCharSetProbercBsSeZdZddZdZedZedZdZ dZ RS(s This CharSetProber uses a "code scheme" approach for detecting encodings, whereby easily recognizable escape or shift sequences are relied on to identify these encodings. cCstt|jd|g|_|jtj@ra|jjtt |jjtt n|jtj @r|jjtt n|jtj @r|jjttnd|_d|_d|_d|_|jdS(Nt lang_filter(tsuperR t__init__t coding_smR RtCHINESE_SIMPLIFIEDtappendRRRtJAPANESERtKOREANRtNonetactive_sm_countt_detected_charsett_detected_languaget_statetreset(tselfR ((sA/usr/lib/python2.7/site-packages/pip/_vendor/chardet/escprober.pyR *s     cCsntt|jx0|jD]%}|s/qnt|_|jqWt|j|_d|_ d|_ dS(N( R R RR tTruetactivetlenRRRR(RR ((sA/usr/lib/python2.7/site-packages/pip/_vendor/chardet/escprober.pyR:s  cCs|jS(N(R(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/chardet/escprober.pyt charset_nameEscCs|jS(N(R(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/chardet/escprober.pytlanguageIscCs|jr dSdSdS(NgGz?g(R(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/chardet/escprober.pytget_confidenceMs cCsx|D]}x|jD]}| s|j r4qn|j|}|tjkrt|_|jd8_|jdkrtj|_ |j Sq|tj krtj |_ |j |_|j|_|j SqWqW|j S(Nii(R Rt next_stateRtERRORtFalseRRtNOT_MERtstatetITS_MEtFOUND_ITtget_coding_state_machineRRR(Rtbyte_strtcR t coding_state((sA/usr/lib/python2.7/site-packages/pip/_vendor/chardet/escprober.pytfeedSs"      N( t__name__t __module__t__doc__RR RtpropertyRRRR*(((sA/usr/lib/python2.7/site-packages/pip/_vendor/chardet/escprober.pyR #s   N(t charsetproberRtcodingstatemachineRtenumsRRRtescsmRRRRR (((sA/usr/lib/python2.7/site-packages/pip/_vendor/chardet/escprober.pyts"