Simplify the code formatting script

Motivation and context

After #8611 and #8866, it's no longer necessary to apply the formatters to each module separately. So don't!

In addition, update the black exclusion list in pyproject.toml to only contain files that were not listed in format_python_code.sh. This way, formatting will automatically be enforced for all new files.

For a few of the files reformatting only creates a small diff, so don't even bother excluding them - reformat them instead.

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • [ ] I have created a changelog fragment
  • [ ] I have updated the documentation accordingly
  • [ ] I have added tests to cover my changes
  • [ ] I have linked related issues (see GitHub docs)
  • [ ] I have increased versions of npm packages if it is necessary (cvat-canvas, cvat-core, cvat-data and cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.

Summary by CodeRabbit

  • Chores

    • Updated Python code formatting script to simplify formatting process
    • Enhanced configuration for isort and black tools
    • Updated documentation for code formatting guidelines
  • Style

    • Refactored code formatting in multiple test generator files to improve readability
    • Standardized string quote usage in management command files

Merge request reports

Loading