-
Notifications
You must be signed in to change notification settings - Fork 0
Init #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 is an initial commit that sets up the auto-detect-exceptions project. It introduces project configuration, core functionality for detecting unhandled exceptions in Python functions, a CLI interface, and a comprehensive test suite.
- Added a pyproject.toml file with project and dependency settings.
- Implemented exception detection logic in several modules and provided corresponding tests.
- Introduced a CLI and docstring updater utility using libcst.
Reviewed Changes
| File | Description |
|---|---|
| pyproject.toml | Configuration of project metadata and dependency management. |
| src/auto_detect_exceptions/detect.py | Added functions to retrieve file paths and detect exceptions in functions. |
| src/auto_detect_exceptions/cli.py | Introduced the CLI interface and report generation functionality. |
| src/auto_detect_exceptions/tests/* | Added tests covering AST parsing, docstring updates, exception detection. |
| src/auto_detect_exceptions/bk/exception_analyzer.py | Added experimental backup version of the exception analyzer. |
| src/auto_detect_exceptions/main.py, ast_utils.py, etc. | Introduced core analysis functions and utilities. |
| .pre-commit-config.yaml | Configured pre-commit hooks for code quality and formatting. |
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/auto_detect_exceptions/bk/exception_analyzer copy.py:1
- [nitpick] The file name 'exception_analyzer copy.py' suggests it might be a backup or duplicate file; consider removing or renaming it to avoid confusion in the repository.
import ast
| return file_path | ||
|
|
||
|
|
||
| def analyze_function(node) -> set[str]: |
Copilot
AI
Mar 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function 'analyze_function' initializes and visits an AST node but never returns a value, which causes 'detect_function_exceptions' to return None instead of the set of exceptions. Consider returning the relevant results (e.g., the collected exceptions) from the analyzer.
No description provided.