diff --git a/pyproject.toml b/pyproject.toml index ae91d28..3e82fbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,5 +35,8 @@ Repository = "https://github.com/Vedantgitbot/booth" [tool.setuptools.packages.find] where = ["src"] +[tool.setuptools.package-data] +booth = ["py.typed"] + [tool.pytest.ini_options] testpaths = ["tests"] \ No newline at end of file diff --git a/src/booth/core.py b/src/booth/core.py index c2b8e73..27b5d76 100644 --- a/src/booth/core.py +++ b/src/booth/core.py @@ -464,7 +464,7 @@ def _evaluate( if attempt.parse_ok and not attempt.passed_validation: return None - if attempt.parse_ok and attempt.confidence >= threshold: + if attempt.parse_ok and attempt.confidence is not None and attempt.confidence >= threshold: status = ACCEPTED if attempt_index == 0 else REPAIRED return BoothResult( answer=attempt.answer, diff --git a/src/booth/py.typed b/src/booth/py.typed new file mode 100644 index 0000000..e69de29