Skip to content

Conversation

@Beaulewis1977
Copy link
Owner

Summary

  • Adds a new script fix_whitespace.py to automatically fix whitespace lint issues W293 (blank line contains whitespace) and W291 (trailing whitespace) in Python files.
  • Cleans up trailing and extra whitespace in many source files across the project.
  • Improves code formatting consistency by removing unnecessary blank lines and trailing spaces.

Changes

New Script

  • fix_whitespace.py: Scans all Python files recursively, fixes whitespace issues, and reports summary.

Code Cleanup

  • Removed trailing whitespace and fixed blank line whitespace in multiple files including:
    • build_all_platforms.py, build_installer/tray_app.py, build_installer/universal_document_converter.py, cli.py, cli_ocr.py, convert_recursive.py, convert_to_markdown.py, create_desktop_shortcut.py, create_executable.py, create_icon.py, create_installer.py, create_simple_installer.py, create_windows_installer.py, cross_platform modules, demo_system_tray.py, direct_launch.py, document_converter_gui.py, enhanced_system_tray.py, gui_ocr.py, install_converter.py, ocr_engine.py, ocr_engine/format_detector.py, ocr_engine/image_processor.py, ocr_engine/ocr_engine.py.
  • Fixed inconsistent blank lines and spacing around imports, function definitions, and class methods.
  • Improved readability by standardizing indentation and line breaks.

Test plan

  • Run fix_whitespace.py to verify it correctly identifies and fixes whitespace issues.
  • Run existing unit and integration tests to ensure no functional regressions.
  • Manually verify UI components and CLI tools launch and operate normally.
  • Confirm no trailing whitespace or blank line whitespace warnings remain in lint checks after applying the fixes.

🌿 Generated by Terry


ℹ️ Tag @terragon-labs to ask questions and address PR feedback

📎 Task: https://www.terragonlabs.com/task/ad8f7234-9800-4ba1-a269-c8dd9ea5e371

…hon files

- Added script to fix W291 (trailing whitespace) and W293 (blank line contains whitespace) issues
- Script recursively processes Python files in the project directory
- Cleans up whitespace while preserving line endings
- Reports summary of fixes applied

Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
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