o
    Zh                     @  sR   d Z ddlmZ ddlZddlmZ ddlmZ dgZeej	dd	dddZ	dS )z
Python polyfills for os
    )annotationsN)AnyStr   )substitute_in_graphfspathT)Zcan_constant_fold_throughpathAnyStr | os.PathLike[AnyStr]returnr   c                 C  s   t | ttfr	| S t| }z|| }W n ty*   t|dr! td|j d w t |ttfr4|S td|j dt|j )N
__fspath__z/expected str, bytes or os.PathLike object, not z	expected z*.__fspath__() to return str or bytes, not )	
isinstancestrbytestyper
   AttributeErrorhasattr	TypeError__name__)r   	path_type	path_repr r   I/var/www/auris/lib/python3.10/site-packages/torch/_dynamo/polyfills/os.pyr      s*   


)r   r   r	   r   )
__doc__
__future__r   ostypingr   Z
decoratorsr   __all__r   r   r   r   r   <module>   s    