Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin committed Dec 5, 2024
1 parent 6a9543f commit d17e0a1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/fundamend/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import json
import sys
from pathlib import Path
from typing_extensions import Annotated

import typer
from pydantic import RootModel
from rich.console import Console
from typing_extensions import Annotated

from fundamend import AhbReader, Anwendungshandbuch, MessageImplementationGuide, MigReader

Expand Down Expand Up @@ -41,14 +41,19 @@ def _convert_to_json_file(xml_file_path: Path) -> Path:


@app.command()
def main(xml_path: Annotated[Path, typer.Option(
def main(
xml_path: Annotated[
Path,
typer.Option(
exists=True,
file_okay=True,
dir_okay=True,
writable=True,
readable=True,
resolve_path=True,
)]) -> None:
),
]
) -> None:
"""
converts the xml file from xml_in_path to a json file next to the .xml
"""
Expand All @@ -61,6 +66,7 @@ def main(xml_path: Annotated[Path, typer.Option(
else:
_convert_to_json_file(xml_path)


def cli() -> None:
"""entry point of the script defined in pyproject.toml"""
typer.run(main)
typer.run(main)

0 comments on commit d17e0a1

Please sign in to comment.