a
    h                     @  sX   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ddZ	dS )z
Python polyfills for os
    )annotationsN)AnyStr   )substitute_in_graphfspathT)Zcan_constant_fold_throughzAnyStr | os.PathLike[AnyStr]r   )pathreturnc                 C  s   t | ttfr| S t| }z|| }W n0 tyX   t|drB td|j d Y n0 t |ttfrl|S td|j dt|j d S )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   H/var/www/auris/lib/python3.9/site-packages/torch/_dynamo/polyfills/os.pyr      s(    


)
__doc__
__future__r   ostypingr   Z
decoratorsr   __all__r   r   r   r   r   <module>   s   