dݍ` h d dl mZ d dlmZmZmZmZ d dlmZ d dl m
Z
mZmZ dZ
G d d ZdS ) )Path)CallableIterableIteratorList)PermissionMissing)is_python_moduleis_python_package
is_virtualenv)z.gitz.toxz.mypy_cachez
.pytest_cachez.venv__pycache__node_modulesc @ e Zd ZdZdddedee fdZdee fdZ d ede
fd
Zdee dee fdZd
ede
e fdZedee fd Zedee fd Zedee fd Zedee fd ZdS )
FileFinderad
This class is responsible for taking a combination of command-line arguments
and configuration loaded from a profile to discover all files and modules which
should be inspected.
Individual tools can be told to ignore certain files, so the job of this class
is basically to know which files to pass to which tools to be inspected.
N)exclusion_filtersprovided_pathsr c g | _ g | _ d t gt |pg z | _ |D ]}| st
| | }| r| j | |
r| j | dS )a?
:param provided_paths:
A list of Path objects to search for files and modules - can be either directories or files
:param exclusion_filters:
An optional list of filters. All paths will be checked against this list - if any return True,
the path is excluded.
c F | o
| j t v S N)is_dirname_SKIP_DIRECTORIES)_paths c/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/prospector/finder.py