File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ def main() -> None:
210210 help = "Emit only the Table of Contents as JSON (array of parts)." ,
211211 )
212212
213- args = p .parse_args ()
213+ args : argparse . Namespace = p .parse_args ()
214214
215215 # Translate --debug into (debug: bool, debug_pages: Optional[int])
216216 if args .debug is None :
Original file line number Diff line number Diff line change 33
44import re
55from collections import OrderedDict
6+ from os import PathLike
67from pathlib import Path
78from typing import Any
89
1617from .parsing .headers import parse_fek_header
1718from .parsing .normalize import dehyphenate_text , normalize_text
1819
20+ # Convenience alias for public API
21+ Pathish = str | Path | PathLike [str ]
22+
1923
2024def extract_pdf_info (
21- pdf_path : Path ,
25+ pdf_path : Pathish ,
2226 include_metrics : bool = False ,
2327 ** kwargs : Any ,
2428) -> dict [str , Any ]:
@@ -99,7 +103,7 @@ def extract_pdf_info(
99103
100104
101105def extract (
102- input_path : Path ,
106+ input_path : Pathish ,
103107 include_metrics : bool = False ,
104108 ** kwargs : Any ,
105109) -> list [dict [str , Any ]]:
You can’t perform that action at this time.
0 commit comments