@@ -561,8 +561,9 @@ def create_endpoint(
561
561
version = "1"
562
562
return self ._build_endpoint (endpoint_name , account_name , version )
563
563
564
+ @staticmethod
564
565
def source_from_path (
565
- self , input_path : Union [Path , str ], fix_pdf : bool = False
566
+ input_path : Union [Path , str ], fix_pdf : bool = False
566
567
) -> PathInput :
567
568
"""
568
569
Load a document from an absolute path, as a string.
@@ -576,9 +577,8 @@ def source_from_path(
576
577
input_doc .fix_pdf ()
577
578
return input_doc
578
579
579
- def source_from_file (
580
- self , input_file : BinaryIO , fix_pdf : bool = False
581
- ) -> FileInput :
580
+ @staticmethod
581
+ def source_from_file (input_file : BinaryIO , fix_pdf : bool = False ) -> FileInput :
582
582
"""
583
583
Load a document from a normal Python file object/handle.
584
584
@@ -591,8 +591,9 @@ def source_from_file(
591
591
input_doc .fix_pdf ()
592
592
return input_doc
593
593
594
+ @staticmethod
594
595
def source_from_b64string (
595
- self , input_string : str , filename : str , fix_pdf : bool = False
596
+ input_string : str , filename : str , fix_pdf : bool = False
596
597
) -> Base64Input :
597
598
"""
598
599
Load a document from a base64 encoded string.
@@ -607,8 +608,9 @@ def source_from_b64string(
607
608
input_doc .fix_pdf ()
608
609
return input_doc
609
610
611
+ @staticmethod
610
612
def source_from_bytes (
611
- self , input_bytes : bytes , filename : str , fix_pdf : bool = False
613
+ input_bytes : bytes , filename : str , fix_pdf : bool = False
612
614
) -> BytesInput :
613
615
"""
614
616
Load a document from raw bytes.
@@ -623,8 +625,8 @@ def source_from_bytes(
623
625
input_doc .fix_pdf ()
624
626
return input_doc
625
627
628
+ @staticmethod
626
629
def source_from_url (
627
- self ,
628
630
url : str ,
629
631
) -> UrlInputSource :
630
632
"""
0 commit comments