+
    "Ý³jf  ã                  óÔ   € ^ RI Ht ^ RIt^ RIHt ^ RIHtHtHtH	t	H
t
 ]
]]	]],          ,          3,          tR R lt]! RR7      R	 R
 l4       tR R ltR R ltRRRR/R R lltR# )é    )ÚannotationsN)Ú	lru_cache)ÚAnyÚCallableÚ	FrozenSetÚOptionalÚTuplec               ó    € V ^8„  d   QhRRRR/# ©é   Úcallable_objr   ÚreturnÚSupportedKwargInfo© )Úformats   "ÚX/home/luca/screen-checking/.venv/lib/python3.14/site-packages/gptqmodel/utils/inspect.pyÚ__annotate__r      s   € ÷ ñ °ð Ð>Pñ ó    c                ó–  €  \         P                  ! V 4      p\        ;QJ d4    R TP
                  P                  4        4       F  '       g   K   RM)	  RM%! R TP
                  P                  4        4       4      '       d   R# \        R TP
                  P                  4        4       4      pRT3#   \        \        3 d    Ru # i ; i)z>Inspect one callable without retaining it in any global cache.Tc              3  ón   "  € T F+  qP                   \        P                  P                  8H  x € K-  	  R # 5i©N)ÚkindÚinspectÚ	ParameterÚVAR_KEYWORD)Ú.0Úparams   & r   Ú	<genexpr>Ú1_get_supported_kwargs_uncached.<locals>.<genexpr>   s%   é € Ð
bÑDa¸5�:‰:œ×*Ñ*×6Ñ6Ö6ÓDaùs   ‚35Fc              3  ó´   "  € T FN  w  rVP                   \        P                  P                  \        P                  P                  39   g   KJ  Vx € KP  	  R # 5ir   )r   r   r   ÚPOSITIONAL_OR_KEYWORDÚKEYWORD_ONLY)r   Únamer   s   &  r   r   r      sD   é € ð á7‰KˆDØ�:‰:œ'×+Ñ+×AÑAÄ7×CTÑCT×CaÑCaÐbÑb÷ 	ŠÛ7ùs   ‚AAÁ
A)TN)	r   Ú	signatureÚ	TypeErrorÚ
ValueErrorÚanyÚ
parametersÚvaluesÚ	frozensetÚitems)r   r$   Úalloweds   &  r   Ú_get_supported_kwargs_uncachedr-      s¬   € ðÜ×%Ò% lÓ3ˆ	÷ ƒsÑ
bÀI×DXÑDX×D_ÑD_ÔDaÓ
b‡s‡s‚sÑ
bÀI×DXÑDX×D_ÑD_ÔDaÓ
b×bÒbØÐäñ à$×/Ñ/×5Ñ5Ô7óó €Gð
 �'ˆ>Ðøô ”zÐ"ô ØÒðús   ‚B2 Â2CÃCé   )Úmaxsizec               ó    € V ^8„  d   QhRRRR/# )r   Úsignature_targetr   r   r   r   )r   s   "r   r   r   #   s   € ÷ <ñ <°8ð <Ð@Rñ <r   c                ó   € \        V 4      # )zíInspect a cache-safe callable identity.

Only stable function objects should reach this helper. Bound methods and
instance-bound builtin methods must be normalized or bypass this cache so
the cache never keeps heavyweight objects alive.
)r-   )r1   s   &r   Ú_get_supported_kwargs_cachedr3   "   s   € ô *Ð*:Ó;Ð;r   c               ó    € V ^8„  d   QhRRRR/# )r   r   r   r   Úboolr   )r   s   "r   r   r   -   s   € ÷ 4ñ 4¨ð 4°dñ 4r   c                óœ   € \         P                  ! V 4      '       g   R# \        V RR4      pVRJ ;'       g    \         P                  ! V4      # )a^  Return True only for builtin callables that are safe to cache directly.

Keep this branch conservative. Builtin methods such as ``[].append`` expose
``__self__`` as the owning instance; caching them directly would retain that
instance. Module-level builtins like ``len`` instead point at the builtins
module and are safe to reuse across the process.
FÚ__self__N)r   Ú	isbuiltinÚgetattrÚismodule)r   Úowners   & r   Ú_is_cache_safe_builtinr<   -   sC   € ô ×Ò˜\×*Ò*Ùä�L *¨dÓ3€EØ�Dˆ=×3Ð3œG×,Ò,¨UÓ3Ð3r   c               ó    € V ^8„  d   QhRRRR/# r   r   )r   s   "r   r   r   <   s   € ÷ 8ñ 8 xð 8Ð4Fñ 8r   c                óÖ   € \        V RR4      pVe   \        V4      # \        P                  ! V 4      '       d   \        V 4      # \	        V 4      '       d   \        V 4      # \        V 4      # )a  Return (accepts_var_kwargs, allowed_kwargs) for a callable.

allowed_kwargs is None when the callable uses ``**kwargs`` or when inspection fails.

Never cache ``callable_obj`` directly. Multi-device quantization passes
bound ``nn.Module.forward`` methods here; caching those bound methods keeps
the owning module replicas alive and pins their device tensors in memory.
Instead, bound Python methods are normalized to ``__func__`` before hitting
the internal cache, while less stable callables fall back to uncached
inspection.
Ú__func__N)r9   r3   r   Ú
isfunctionr<   r-   )r   Úfuncs   & r   Úget_supported_kwargsrB   <   sb   € ô �< ¨TÓ2€DØÒô ,¨DÓ1Ð1ä×Ò˜,×'Ò'Ü+¨LÓ9Ð9ä˜l×+Ò+Ü+¨LÓ9Ð9ä)¨,Ó7Ð7r   ÚkwargsÚ
on_removedc               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r   r   Úargsr   rC   zOptional[dict]rD   z%Optional[Callable[[list[str]], None]]r   )r   s   "r   r   r   X   s0   € ÷ +ñ +Øð+àð+ð ð+ð 6ñ	+r   c               ó8  a	€ \        T;'       g    / 4      p\        V 4      w  po	V'       g   S	f	   V ! V/ VB # VP                  4        UUu/ uF  w  rVVS	9   g   K  WVbK  	  pppVe&   \        V	3R lV 4       4      pV'       d	   V! V4       V ! V/ VB # u uppi )aÀ  Invoke ``callable_obj`` with kwargs filtered against its signature.

Many third-party helpers (e.g., hub download utilities) have a strict
keyword signature. This helper allows callers to gather keyword arguments
from multiple sources, filter out unsupported ones via inspection, and
invoke the callable safely without tripping ``TypeError``. When the
callable accepts ``**kwargs`` or inspection fails, the original kwargs are
forwarded unchanged.
c              3  ó8   <"  € T F  qS9  g   K  Vx € K  	  R # 5ir   r   )r   ÚkeyÚallowed_kwargss   & €r   r   Ú#safe_kwargs_call.<locals>.<genexpr>o   s   øé € ÐL© ¸^Ñ2KŸš«ùs   ƒ�
)ÚdictrB   r+   Úsorted)
r   rC   rD   rF   Úaccepts_var_kwrI   ÚvalueÚfilteredÚremovedrJ   s
   &$$*     @r   Úsafe_kwargs_callrR   X   sš   ø€ ô  �&—,�,˜BÓ€FÜ%9¸,Ó%GÑ"€N�Nß˜Ò/Ù˜TÐ, VÑ,Ð,à-3¯\©\¬^ÔU©^™z˜s¸sÀnÑ?T”
�’
©^€HÑUØÒÜÔL©ÓLÓLˆßÙ�wÔÙ˜Ð* Ñ*Ð*ùó Vs   ÁBÁB)Ú
__future__r   r   Ú	functoolsr   Útypingr   r   r   r   r	   r5   Ústrr   r-   r3   r<   rB   rR   r   r   r   Ú<module>rW      sw   ðõ #ã Ý ß <Õ <ð ˜4 ¨)°C­.Õ!9Ð9Õ:Ð õñ$ �3Ôô<ó ð<õ4õ8ð8+ð "ð+ð 9=÷	+ñ +r   