Skip to content

fix: Add .gitattributes to enforce LF line endings for Code Quality workflow#29

Merged
CervezaStallone merged 7 commits into
mainfrom
fix/code-quality-line-endings
Dec 18, 2025
Merged

fix: Add .gitattributes to enforce LF line endings for Code Quality workflow#29
CervezaStallone merged 7 commits into
mainfrom
fix/code-quality-line-endings

Conversation

@CervezaStallone

Copy link
Copy Markdown
Owner

Summary

This PR fixes the Code Quality workflow failures by enforcing consistent line endings.

Problem

The Code Quality workflow was failing because Black detected formatting differences between Windows development (CRLF line endings) and Linux CI (LF line endings). Even though files appeared correctly formatted locally, Black in CI would detect differences.

Solution

  • Add .gitattributes to enforce LF line endings for all text files
  • Normalize existing binary files
  • This ensures consistent line endings across Windows and Linux environments

Impact

  • ✅ Fixes Code Quality workflow Black formatting checks
  • ✅ Prevents future line ending inconsistencies
  • ✅ Maintains code formatting consistency across all environments

Checklist

  • Added .gitattributes file
  • Normalized existing files
  • Tested locally
  • Ready for CI validation

Fixes line ending issues causing Code Quality workflow failures.

…orkflow

- Add .gitattributes to enforce LF line endings on all text files
- This prevents CRLF/LF inconsistencies between Windows development and Linux CI
- Normalize existing binary files (favicon.ico)
- Fixes Black formatting differences in Code Quality workflow
- Reformat modbus_app/admin.py, tasks.py, serializers.py, views.py
- Reformat modbus_webserver/asgi.py, urls.py
- Fixes line ending inconsistencies between Windows and Linux
- All files now consistently formatted with Black 24.3.0
- Fix import sorting in all Python files
- Ensures consistent import order between Windows and Linux
- Apply Black and isort formatting with LF line endings
- Fixes multi-line import formatting
- Resolves Code Quality workflow failures
- Configure Black with line-length=120 and Python 3.11 target
- Configure isort with black profile for compatibility
- Apply consistent formatting across all Python files
- Fixes Code Quality workflow by ensuring Black and isort agree on formatting
- Remove unused imports in tasks.py and tests.py
- Fix f-string without placeholders in modbus_driver.py
- Break long lines to under 120 characters
- Add noqa comments for intentional E402 violations (imports after Django setup)
- Fix bare except clauses in test_settings.py
- Fixes Code Quality workflow Flake8 step
- Remove unused imports (database_sync_to_async, timezone, datetime, timedelta, Optional, ModbusException, Register)
- Remove unused variables (e, result)
- Convert f-strings without placeholders to regular strings
- Fixes all remaining Code Quality workflow failures
@CervezaStallone
CervezaStallone merged commit ee49512 into main Dec 18, 2025
8 checks passed
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.

1 participant