Skip to content

Refactor CLI entry point to use main() function#17

Merged
marevol merged 1 commit intomainfrom
refactor/cli-main-entry
Aug 14, 2025
Merged

Refactor CLI entry point to use main() function#17
marevol merged 1 commit intomainfrom
refactor/cli-main-entry

Conversation

@marevol
Copy link
Contributor

@marevol marevol commented Aug 14, 2025

This update refactors the CLI entry point by introducing a main() function that calls app(). The if name == "main" block now invokes main() instead of calling app() directly. This change improves maintainability and allows the CLI to be executed programmatically from other modules without relying on the main check.

@marevol marevol requested a review from Copilot August 14, 2025 00:47
@marevol marevol self-assigned this Aug 14, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the CLI entry point to improve maintainability and programmatic access by introducing a main() function wrapper around the existing app() call. This follows Python packaging best practices for CLI applications.

  • Introduces a new main() function that calls app()
  • Updates the if __name__ == "__main__" block to call main() instead of app() directly

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.



if __name__ == "__main__":
def main():
Copy link

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main() function should include a docstring to document its purpose as the CLI entry point, especially since it's intended for programmatic use from other modules.

Suggested change
def main():
def main():
"""
CLI entry point for fessctl.
This function invokes the Typer application and can be called programmatically
from other modules to start the CLI.
"""

Copilot uses AI. Check for mistakes.
@marevol marevol merged commit f26d3ef into main Aug 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants