pyanno4rt.input_check.check_functions._check_regular_extension

File regularity and extension checking.

Overview

Function

check_regular_extension(label, data, extensions)

Check if a file path is irregular or has an invalid extension.

Functions

pyanno4rt.input_check.check_functions._check_regular_extension.check_regular_extension(label, data, extensions)[source]

Check if a file path is irregular or has an invalid extension.

Parameters:
  • label (str) – Label for the item to be checked.

  • data (str) – Path to the file.

  • extensions (tuple) – Tuple with the allowed extensions for the file path.

Raises:
  • FileNotFoundError – If the path references an irregular file.

  • TypeError – If the path has an invalid extension.