Skip to content

Conversation

@lucemia
Copy link
Contributor

@lucemia lucemia commented Mar 10, 2025

No description provided.

@lucemia lucemia requested a review from Copilot March 10, 2025 09:56
Copy link

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.

PR Overview

This PR adds a new "existing only mode" that ensures only functions with an existing docstring are updated with exception documentation. Key changes include:

  • Updating test cases to validate that functions without a docstring remain unchanged.
  • Modifying process_directory and CLI argument parsing in cli.py to support a new only_existing flag.
  • Enhancing docstring_utils.py to conditionally update docstrings based on the presence of an existing docstring.

Reviewed Changes

File Description
src/auto_detect_exceptions/tests/test_cli.py Adds a new test to verify that only functions with an existing docstring are updated.
src/auto_detect_exceptions/tests/test_docstring_utils.py Modifies the test to assert that functions lacking a docstring are not updated.
src/auto_detect_exceptions/cli.py Updates process_directory signature and CLI argument parsing to incorporate the only_existing flag.
src/auto_detect_exceptions/docstring_utils.py Extends DocstringUpdater and update_function_docstrings to conditionally update functions.

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

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