
    i;                    Z    U d Z ddlmZ ddlZdZded<   dZded	<   d
Zded<   dddZddZ	y)z&Internal shared utilities for chardet.    )annotationsNi@ intDEFAULT_MAX_BYTESg?floatMINIMUM_THRESHOLDi   _DEFAULT_CHUNK_SIZEc                P    | t         k7  rt        j                  dt        |       yy)zDEmit a deprecation warning if *chunk_size* differs from the default.zEchunk_size is not used in this version of chardet and will be ignored)
stacklevelN)r   warningswarnDeprecationWarning)
chunk_sizer
   s     ^/Users/bowang/.openclaw/workspace/ChatDev/.venv/lib/python3.12/site-packages/chardet/_utils.py_warn_deprecated_chunk_sizer      s%    ((S!	
 )    c                h    t        | t              st        | t              r| dk  rd}t        |      y)z:Raise ValueError if *max_bytes* is not a positive integer.   z$max_bytes must be a positive integerN)
isinstanceboolr   
ValueError)	max_bytesmsgs     r   _validate_max_bytesr      s2    )T"*Y*D	TU4o IVr   )   )r   r   r
   r   returnNone)r   r   r   r   )
__doc__
__future__r   r   r   __annotations__r   r   r   r    r   r   <module>r!      s?    , "  ! 3     5  " S !
r   