Skip to content

Commit

Permalink
fix: add extra entry point to cli.py module
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin committed Dec 5, 2024
1 parent c285a28 commit b5ea64c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ profile = "black"
max-line-length = 120

[project.scripts]
xml2json = "fundamend.cli:main"
xml2json = "fundamend.cli:cli"
# fundamend is the package in the src directory
# .cli means the cli.py module inside the fundamend package
# :main means the def main() function inside the cli.py module
# :cli means the def cli() function inside the cli.py module

[mypy]
truethy-bool = true
Expand Down
4 changes: 4 additions & 0 deletions src/fundamend/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ def main(xml_in_path: Path) -> None:
_convert_to_json_file(xml_path)
else:
_convert_to_json_file(xml_in_path)

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

0 comments on commit b5ea64c

Please sign in to comment.