Fix minor bugs caused from merging in setupcontroller; Initialize vscode example loading

This commit is contained in:
Timothyxxx
2024-01-14 00:51:26 +08:00
parent 347160a35f
commit 2228f346a9
14 changed files with 148 additions and 138 deletions

View File

@@ -1,13 +1,11 @@
from pypdf import PdfReader
import operator
from typing import Dict
from typing import Any
from typing import Dict
from pypdf import PdfReader
def check_pdf_pages(pdf_file: str, rules: Dict[str, Any]) -> float:
reader = PdfReader(pdf_file)
nb_pages: int = len(reader.pages)
return float( getattr(operator, rules["relation"])( nb_pages
, rules["ref_value"]
)
)
return float(getattr(operator, rules["relation"])(nb_pages, rules["ref_value"]))