refactor: standardize public interface with __all__

Close issue #646
This commit is contained in:
SWHL committed 2026-02-28 23:37:25 +08:00
1 parent 7c880e8ac9
commit 5aa9079e75
11 files changed
+34 -2

No files matched your search

+12
View File
@@ -5,3 +5,15 @@ from .main import RapidOCR
from .utils.load_image import LoadImageError
from .utils.typings import EngineType, LangCls, LangDet, LangRec, ModelType, OCRVersion
from .utils.vis_res import VisRes
__all__ = [
"RapidOCR",
"LoadImageError",
"EngineType",
"LangCls",
"LangDet",
"LangRec",
"ModelType",
"OCRVersion",
"VisRes",
]
@@ -2,3 +2,5 @@
# @Author: SWHL
# @Contact: liekkaskono@163.com
from .main import CalRecBoxes
__all__ = ["CalRecBoxes"]
+2
View File
@@ -3,3 +3,5 @@
# @Contact: liekkaskono@163.com
from .main import TextClassifier
from .utils import TextClsOutput
__all__ = ["TextClassifier", "TextClsOutput"]
+2
View File
@@ -3,3 +3,5 @@
# @Contact: liekkaskono@163.com
from .main import TextDetector
from .utils import TextDetOutput
__all__ = ["TextDetector", "TextDetOutput"]
+2
View File
@@ -3,3 +3,5 @@
# @Contact: liekkaskono@163.com
from .main import TextRecognizer
from .typings import TextRecInput, TextRecOutput
__all__ = ["TextRecognizer", "TextRecInput", "TextRecOutput"]
@@ -2,3 +2,5 @@
# @Author: SWHL
# @Contact: liekkaskono@163.com
from .main import MNNError, MNNInferSession
__all__ = ["MNNError", "MNNInferSession"]
@@ -1,4 +1,6 @@
# -*- encoding: utf-8 -*-
# @Author: SWHL
# @Contact: liekkaskono@163.com
from .main import OrtInferSession
from .main import ONNXRuntimeError, OrtInferSession
__all__ = ["ONNXRuntimeError", "OrtInferSession"]
@@ -2,3 +2,5 @@
# @Author: SWHL
# @Contact: liekkaskono@163.com
from .main import OpenVINOError, OpenVINOInferSession
__all__ = ["OpenVINOError", "OpenVINOInferSession"]
@@ -2,3 +2,5 @@
# @Author: SWHL
# @Contact: liekkaskono@163.com
from .main import PaddleInferError, PaddleInferSession
__all__ = ["PaddleInferError", "PaddleInferSession"]
@@ -2,3 +2,5 @@
# @Author: SWHL
# @Contact: liekkaskono@163.com
from .main import TorchInferError, TorchInferSession
__all__ = ["TorchInferError", "TorchInferSession"]
@@ -1,4 +1,6 @@
# -*- encoding: utf-8 -*-
# @Author: SWHL
# @Contact: liekkaskono@163.com
from .main import TRTInferSession
from .main import TensorRTError, TRTInferSession
__all__ = ["TensorRTError", "TRTInferSession"]