Ë
    ÿÍ:jÞ  ã                   óø   — d Z ddlZddlmZ ddlmZmZ ddlmZ  ej                  de¬«       ej                  Zdded	dfd
„Z	 ddeeef   dee   dededee   d	efd„Zee_
         G d„ de«      Zded	efd„Zy)zWarning-related utilities.é    N)ÚPath)ÚOptionalÚUnion)ÚLightningDeprecationWarningÚdefault)ÚcategoryÚmoduleÚreturnc                 ó<   — t        j                  d| t        ¬«       y)au  Ignore warnings of the category ``PossibleUserWarning`` from Lightning.

    For more granular control over which warnings to ignore, use :func:`warnings.filterwarnings` directly.

    Args:
        module: Name of the module for which the warnings should be ignored (e.g., ``'pytorch_lightning.strategies'``).
            Default: Disables warnings from all modules.

    Úignore)r	   r   N)ÚwarningsÚfilterwarningsÚPossibleUserWarning)r	   s    úx/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/lightning_fabric/utilities/warnings.pyÚdisable_possible_user_warningsr      s   € ô ×Ñ˜H¨VÔ>QÖRó    Úmessager   ÚfilenameÚlinenoÚlinec                 ó^   — t        t        |«      «      r|› d|› d| › d�S t        | ||||«      S )zhCustom formatting that avoids an extra line in case warnings are emitted from the `rank_zero`-functions.ú:z: ú
)Ú_is_path_in_lightningr   Ú_default_format_warning)r   r   r   r   r   s        r   Ú_custom_format_warningr   (   s<   € ô œT (›^Ô,à�˜1˜V˜H B w i¨rÐ2Ð2Ü" 7¨H°hÀÈÓMÐMr   c                   ó   — e Zd ZdZy)r   z'Warnings that could be false positives.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   r   r   5   s   „ Ú1r   r   Úpathc                 ó8   — dt        | j                  «       «      v S )zJNaive check whether the path looks like a path from the lightning package.Ú	lightning)ÚstrÚabsolute)r#   s    r   r   r   9   s   € àœ#˜dŸm™m›oÓ.Ð.Ð.r   )Ú )N)r!   r   Úpathlibr   Útypingr   r   Ú$lightning_fabric.utilities.rank_zeror   ÚsimplefilterÚformatwarningr   r&   r   ÚWarningÚtypeÚintr   ÚUserWarningr   Úboolr   r"   r   r   ú<module>r3      sÌ   ðñ !ã Ý ß "å Lð €× Ñ �iÐ*EÕ FØ"×0Ñ0Ð ñ
S¨3ð 
S¸ó 
Sð nrñNØ�7˜C�<Ñ ðNØ,0°©MðNØEHðNØRUðNØ]eÐfiÑ]jðNàóNð 0€Ô ô2˜+ô 2ð/ ð /¨ô /r   