diff --git a/penify_hook/commands/doc_commands.py b/penify_hook/commands/doc_commands.py index e39f9bb..20b7885 100644 --- a/penify_hook/commands/doc_commands.py +++ b/penify_hook/commands/doc_commands.py @@ -122,19 +122,17 @@ def setup_docgen_parser(parser): default=os.getcwd()) def handle_docgen(args): - """Handle various subcommands related to document generation and hook - management. - - This function processes different subcommands such as installing or - uninstalling git hooks, and directly generating documentation based on - provided arguments. + # Only import dependencies needed for docgen functionality here + """Handle various subcommands related to document generation and hook management. + + This function processes different subcommands such as installing or uninstalling git hooks, and directly generating + documentation based on provided arguments. It handles authentication by retrieving a token and performs actions based on + the specified subcommand. + Args: - args (Namespace): Parsed command-line arguments containing the subcommand and location - details. + args (Namespace): Parsed command-line arguments containing the subcommand and location details. """ - - # Only import dependencies needed for docgen functionality here from penify_hook.commands.config_commands import get_token import sys from penify_hook.commands.doc_commands import generate_doc diff --git a/penify_hook/main.py b/penify_hook/main.py index 35c332b..815e3d7 100644 --- a/penify_hook/main.py +++ b/penify_hook/main.py @@ -4,19 +4,16 @@ def main(): - """Main function to handle command-line interface (CLI) interactions with - Penify services. - - This tool provides a command-line interface for generating smart commit - messages, configuring local-LLM and JIRA, and generating code - documentation. It supports basic commands that do not require login and - advanced commands that require user authentication. The `--version` flag - can be used to display the version information. + """Main function to handle command-line interface (CLI) interactions with Penify services. + + This tool provides a command-line interface for generating smart commit messages, configuring local-LLM and JIRA, and + generating code documentation. It supports basic commands that do not require login and advanced commands that require + user authentication. The `--version` flag can be used to display the version information. + Returns: int: Exit status of the program (0 for success, 1 for error). """ - parser = argparse.ArgumentParser( description="""Penify CLI tool for: 1. AI commit message generation with JIRA integration to enhance commit messages.