Skip to content

refactor sanitize add auto format #326

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

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

fangyangci
Copy link

@fangyangci fangyangci commented Jun 27, 2025

  1. Package Structure
    Before: Single 800+ line sanitize.py file
    After: Modular sanitize/ package with logical separation:

  2. Backward Compatibility
    ✅ CLI remains identical: python sanitize.py -h, python sanitize.py -v
    ✅ Output exactly matches sanitize_old.py
    ✅ All existing workflows unchanged

  3. Code Quality Improvements

Optional Fields: Added Optional[] type hints for better type safety
Auto-formatting: Added Black formatter integration with 120-char line length

🧪 Validation
Function-by-function comparison with original implementation

Identical output for all test scenarios
No breaking changes to existing configurations

@fangyangci fangyangci changed the title Fangyangci/refactor sanitize refactor sanitize add auto format Jun 27, 2025
@xieofxie
Copy link

where do you add auto format?

@fangyangci
Copy link
Author

fangyangci commented Jun 27, 2025

where do you add auto format?

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