Fix some errors found in calc examples
This commit is contained in:
@@ -6,6 +6,8 @@ from pypdf import PdfReader
|
||||
|
||||
|
||||
def check_pdf_pages(pdf_file: str, rules: Dict[str, Any]) -> float:
|
||||
if pdf_file is None:
|
||||
return 0.0
|
||||
reader = PdfReader(pdf_file)
|
||||
nb_pages: int = len(reader.pages)
|
||||
return float(getattr(operator, rules["relation"])(nb_pages, rules["ref_value"]))
|
||||
|
||||
Reference in New Issue
Block a user