
    קg                    t    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            Z	dS )z
Python polyfills for os
    )annotationsN)AnyStr   )substitute_in_graphfspathT)can_constant_fold_throughpathAnyStr | os.PathLike[AnyStr]returnr   c                   t          | t          t          f          r| S t          |           }	 |                    |           }n7# t
          $ r* t          |d          r t          d|j                   d w xY wt          |t          t          f          r|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_reprs      V/var/www/html/ai-engine/env/lib/python3.11/site-packages/torch/_dynamo/polyfills/os.pyr   r      s    $e%% T

I((..		   9l++ 	Ri>PRR
 
	 )c5\** 
	*I& 	* 	*I'	* 	*  s   A 4A9)r	   r
   r   r   )
__doc__
__future__r   ostypingr   
decoratorsr   __all__r        r   <module>r!      s     # " " " " " 				       , , , , , , * RY$???   @?  r    