File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ class TEIParser:
4848 def __init__ (
4949 self ,
5050 * ,
51- pdf_path : typing .Optional [Path ] = None ,
52- tei_path : typing .Optional [Path ] = None ,
51+ pdf_path : typing .Optional [typing . Union [ Path , str ] ] = None ,
52+ tei_path : typing .Optional [typing . Union [ Path , str ] ] = None ,
5353 ):
5454 """Creates a TEI file
5555 modes of operation:
@@ -60,8 +60,13 @@ def __init__(
6060 # pylint: disable=consider-using-with
6161 assert pdf_path is not None or tei_path is not None
6262 if pdf_path is not None :
63+ pdf_path = Path (pdf_path )
6364 if pdf_path .is_symlink (): # pragma: no cover
6465 pdf_path = pdf_path .resolve ()
66+
67+ if tei_path is not None :
68+ tei_path = Path (tei_path )
69+
6570 self .pdf_path = pdf_path
6671 self .tei_path = tei_path
6772 if pdf_path is not None and not pdf_path .is_file ():
You can’t perform that action at this time.
0 commit comments