https://github.com/tdiprima/python-code-inspector
Code Refactoring Assistant
https://github.com/tdiprima/python-code-inspector
Last synced: 8 months ago
JSON representation
Code Refactoring Assistant
- Host: GitHub
- URL: https://github.com/tdiprima/python-code-inspector
- Owner: tdiprima
- License: mit
- Created: 2024-12-26T18:54:09.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-28T20:53:01.000Z (10 months ago)
- Last Synced: 2025-01-04T22:48:44.826Z (9 months ago)
- Language: Python
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Code Inspector


A refactoring and optimization assistant that analyzes codebases, identifies inefficiencies, and suggests improvements.
## Code Quality Checks
- **Complexity Analysis**
- Functions with too many decision paths (if statements, loops, etc.)
- Deeply nested code blocks
- Complex conditional statements- **Code Smells**
- Nested loops beyond 2 levels
- Long functions
- Redundant code patterns- **Optimization Opportunities**
- List comprehension suggestions
- Loop optimizations
- Data structure improvements## Installation
```bash
pip install -r requirements.txt
```## Quick Start
See examples in the `examples` folder.
The generated report will include:
- File-by-file analysis
- Line numbers for issues
- Description of problems
- Suggested improvements
- Optimized code snippets when available## Requirements
- Python 3.8+
- ast (standard library)
- astroid
- pylint
- radon## Contributing
See [CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines on how to contribute to this project.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.