Skip to content

Commit

Permalink
refactor: Simplify entrypoint and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rushwerks committed Oct 5, 2024
1 parent 8191ad3 commit d4a7d66
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions feefifofum/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from .main import format

__all__ = ['format']
4 changes: 2 additions & 2 deletions feefifofum/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def format_feature_file(file_lines: list[str]) -> list[str]:
return formatted


def format() -> None: # pragma: no cover
def main() -> None: # pragma: no cover
"""Run feature file formatter."""
parser = ArgumentParser(description='Formats feature file')
parser.add_argument(
Expand Down Expand Up @@ -55,4 +55,4 @@ def format() -> None: # pragma: no cover


if __name__ == '__main__': # pragma: no cover
format()
main()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ classifiers = [
Homepage = "https://github.com/rushwerks/feefifofum"

[project.scripts]
feefifofum = "feefifofum:format"
feefifofum = "feefifofum.main:main"

[tool.ruff]
line-length = 120
Expand Down

0 comments on commit d4a7d66

Please sign in to comment.