A chill Python toolkit that keeps your code fresh — refactors messy stuff, finds duplicates, and auto-writes tests so you don't have to cry over tech debt.
src/refactor-kit/
duplicate_finder.py→ spots copy-pasted duplicate code (uses AST + hashes)event_dispatcher.py→ turns your if-elif jungle into a dispatch dictionarytest_generator.py→ whips up pytest tests with mocks, edge cases, and sasslazy_loader.py→ makes imports chill until you actually need themcomplexity_analyzer.sh→ checks how cursed your code complexity really is
Python 3.13+ with the essentials:
pytest,ruff,radon,pre-commitpipreqsfor keeping deps tight
# Find duplicates like a detective
python src/refactor-kit/duplicate_finder.py
# Auto-generate tests (because manual is ✨mid✨)
python src/refactor-kit/test_generator.py <source_file.py> -o test_output.py
# Refactor demo — dispatch style
python src/refactor-kit/event_dispatcher.pyRuns with uv for dependency vibes.
Tests are still cooking, so don't @ me yet.