Enhance the GitHub Actions workflow to automatically check and format Python code using Black. This workflow checks for code formatting issues and, if needed, formats the codebase to ensure consistency and readability. Additionally, the workflow commits the changes only if there are differences after the formatting process. The workflow triggers on pushes to the main branch, ensuring the codebase remains well-formatted at all times.
feat: Auto-format Python code with Black
Enhance the GitHub Actions workflow to automatically check and format Python code using Black. This workflow checks for code formatting issues and, if needed, formats the codebase to ensure consistency and readability. Additionally, the workflow commits the changes only if there are differences after the formatting process. The workflow triggers on pushes to the main branch, ensuring the codebase remains well-formatted at all times.