From c9d92e6bd247f799421258f56417c1f36de39214 Mon Sep 17 00:00:00 2001 From: Jan Domanski Date: Sat, 7 Sep 2024 11:17:26 +0200 Subject: [PATCH] fix mypy linting problem --- src/qreader/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qreader/__init__.py b/src/qreader/__init__.py index cafa3eb..a9af241 100644 --- a/src/qreader/__init__.py +++ b/src/qreader/__init__.py @@ -196,9 +196,12 @@ def decode( def detect_and_decode( self, image: np.ndarray, return_detections: bool = False, is_bgr: bool = False - ) -> typing.Tuple[ + ) -> typing.Union[ + typing.Tuple[ + typing.Tuple[str | None, ...], + tuple[dict[str, np.ndarray | float | tuple[float | int, float | int]]] | None, + ], typing.Tuple[str | None, ...], - tuple[dict[str, np.ndarray | float | tuple[float | int, float | int]]] | None, ]: """ This method will decode the **QR** codes in the given image and return the decoded strings