
    tni                     0    d Z ddlZddlZg dZd ZddZdS )zE Reads the .runpodignore file and returns a list of files to ignore.     N)z__pycache__/z*.pycz.*.swpz.git/z*.tmpz*.logc                     t                                           } t          j                            t          j                    d          }t          j                            |          s| S t          |dd          5 }|D ]B}|                                }|r*|	                    d          s| 
                    |           C	 ddd           n# 1 swxY w Y   | S )zCReads the .runpodignore file and returns a list of files to ignore.z.runpodignorerzUTF-8)encoding#N)EXCLUDE_PATTERNScopyospathjoingetcwdisfileopenstrip
startswithappend)ignore_listignore_fileignore_file_handlelinestripped_lines        ]/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/runpod/cli/utils/rp_runpodignore.pyget_ignore_listr      s   "''))K',,ry{{O<<K7>>+&& 	k3	1	1	1 25G& 	2 	2D JJLLM 2]%=%=c%B%B 2""=111	22 2 2 2 2 2 2 2 2 2 2 2 2 2 2 s   >ACCCc                 4   |t                      }t          j                            | t          j                              }|D ]S}|                    d          r
|dd         }|                    d          r|dz  }t          j        ||          r dS TdS )z<Returns True if the file should be ignored, False otherwise.N/   *TF)r   r	   r
   relpathr   r   endswithfnmatch)	file_pathr   relative_pathpatterns       r   should_ignorer#   !   s    %''GOOIry{{;;M  c"" 	"abbkGC   	sNG?='22 	44	 5    )N)__doc__r   r	   r   r   r#    r$   r   <module>r'      s\    K K  				     "     r$   