INNER CODE UNIT · Python
_is_excluded
yurijmikhalevich/rclip · rclip/main.py:113
def _is_excluded(self, filepath: str, directory: str) -> bool:
relative_path = os.path.relpath(filepath, directory)
if self._skip_hidden and any(part.startswith(".") for part in relative_path.split(os.path.sep)):
return True
return self._exclude_dir_regex.match(os.path.join(".", os.path.dirname(relative_path))) is not None
def _shutdown_image_loading_executor(self) -> None:
if self._image_loading_executor is None:
return
self._image_loading_executor.shutdown(wait=True)
self._image_loading_executor = None
def close(self) -> None:
self._shutdown_image_loading_executor()
def _load_images(
self, items: Iterable[Tuple[str, ImageMeta]]
) -> Iterator[Tuple[str, ImageMeta, str, npt.NDArray[np.float32]]]: