o
    ¹­Rh  ã                   @  s*   d dl mZ d dlmZmZ d
dd„Zd	S )é    )Úannotations)ÚIOÚCallableÚ	file_likeúIO[str]Úreturnú
int | Nonec                 C  s6   t | ddƒ}|durz|ƒ W S  ty   Y dS w dS )zìGet fileno() from a file, accounting for poorly implemented file-like objects.

    Args:
        file_like (IO): A file-like object.

    Returns:
        int | None: The result of fileno if available, or None if operation failed.
    ÚfilenoN)ÚgetattrÚ	Exception)r   r	   © r   úN/home/air/sanwanet/backup_V2/venv/lib/python3.10/site-packages/rich/_fileno.pyÚ
get_fileno   s   	ür   N)r   r   r   r   )Ú
__future__r   Útypingr   r   r   r   r   r   r   Ú<module>   s    