feat: display version in fastapi docs (#78)

Signed-off-by: Eugene <fogaprod@gmail.com>
This commit is contained in:
Eugene
2025-03-07 12:28:05 +04:00
committed by GitHub
parent 05df0735d3
commit ed851c95fe
3 changed files with 12 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
import importlib
import importlib.metadata
import logging
import platform
import sys
@@ -51,9 +51,7 @@ def version_callback(value: bool) -> None:
def callback(
version: Annotated[
Union[bool, None],
typer.Option(
"--version", help="Show the version and exit.", callback=version_callback
),
typer.Option(help="Show the version and exit.", callback=version_callback),
] = None,
verbose: Annotated[
int,
@@ -298,5 +296,4 @@ def main() -> None:
# Launch the CLI when calling python -m docling_serve
if __name__ == "__main__":
main()