File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11from scanbotsdk import *
2+ from typing import List
3+
24
35def scan_barcode (image : ImageRef ):
46 configuration = BarcodeScannerConfiguration (
@@ -16,7 +18,7 @@ def scan_barcode(image: ImageRef):
1618 print_barcodes (result .barcodes )
1719
1820
19- def print_barcodes (barcodes : list [BarcodeItem ]):
21+ def print_barcodes (barcodes : List [BarcodeItem ]):
2022 if not barcodes :
2123 print ("No barcodes found" )
2224 return
Original file line number Diff line number Diff line change 11import os
22from scanbotsdk import *
33from utils import create_image_ref
4+ from typing import Optional
45
5- def crop_and_analyze (image_path : str , save_path : str | None = None ):
6+
7+ def crop_and_analyze (image_path : str , save_path : Optional [str ] = None ):
68 with create_image_ref (image_path ) as image :
79 # Configure scanner
810 config = DocumentScannerConfiguration ()
You can’t perform that action at this time.
0 commit comments