Skip to content

fix: apply pre-commit formatting fixes for 0.4.0 branch code - #10

Closed
gbiavati with Copilot wants to merge 64 commits into
mainfrom
copilot/fix-pre-commit-job-failure
Closed

fix: apply pre-commit formatting fixes for 0.4.0 branch code#10
gbiavati with Copilot wants to merge 64 commits into
mainfrom
copilot/fix-pre-commit-job-failure

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The pre-commit CI job on the 0.4.0 branch was failing because new code introduced in that branch had formatting violations detected by ruff, ruff-format, mdformat, and several other hooks — causing a non-empty diff and exit code 1.

Changes

  • ruff-format: Reformatted several files to comply with 88-char line length (multi-arg function calls split onto separate lines)
  • ruff lint:
    • F401: Removed unused imports (pytest, os, Result) in test files
    • F841: Removed unused variable target in test_60_integration_stream.py
    • I001: Fixed import ordering across multiple test and source files
    • E402: Added # noqa: E402 to the late module-level imports in server_cache_and_stream.py; moved cads_mars_server imports above pytestmark in test_70_ws_integration.py
  • mdformat: Reformatted k8s/DESIGN.md
  • Misc: Fixed trailing whitespace, missing EOF newline (k8s/DESIGN.md, .gitignore), and TOML formatting (pyproject.toml)

The notable manual fix was in server_cache_and_stream.py, where late imports (after function definitions) required explicit suppression:

# Before — combined import, no noqa, E402 reported on subsequent blocks
from .config import (
    CACHE_FOLDER as _cfg_cache_folder,
    SHARED_ROOT as _cfg_shared_root,
    SHARES as _cfg_shares,
)

# After — ruff isort splits these; each needs its own noqa
from .config import (  # noqa: E402
    CACHE_FOLDER as _cfg_cache_folder,
)
from .config import (  # noqa: E402
    SHARED_ROOT as _cfg_shared_root,
)
from .config import (  # noqa: E402
    SHARES as _cfg_shares,
)
from .server import tidy  # noqa: E402

gbiavati and others added 19 commits February 10, 2026 12:19
Co-authored-by: Copilot <copilot@github.com>
…n for streaming

Co-authored-by: Copilot <copilot@github.com>
…he folder options

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…_root, shares, and cache_folder

Co-authored-by: Copilot <copilot@github.com>
- Implement a fake_mars executable for testing purposes.
- Create unit tests for tools, server functions, client, log filtering, and WebSocket server.
- Add integration tests for pipe and stream modes of the HTTP server.
- Ensure comprehensive coverage of request handling, error scenarios, and data integrity.

Co-authored-by: Copilot <copilot@github.com>
Copilot AI added 2 commits June 16, 2026 15:49
- Merge 0.4.0 branch content and apply all formatting fixes
- ruff-format: reformat multiple files for line length compliance
- ruff: fix unused imports (F401), unused variables (F841), import ordering (I001)
- ruff: add noqa: E402 to module-level imports after function definitions
- ruff: move imports before pytestmark in test_70_ws_integration.py
- mdformat: reformat k8s/DESIGN.md
- trailing-whitespace, end-of-file-fixer, pretty-format-toml: misc fixes
Copilot AI changed the title [WIP] Fix failing GitHub Actions job pre-commit fix: apply pre-commit formatting fixes for 0.4.0 branch code Jun 16, 2026
Copilot AI requested a review from gbiavati June 16, 2026 15:52

@gbiavati gbiavati left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting changes are always welcome if they make tests not fail

@gbiavati gbiavati closed this Jun 16, 2026
@gbiavati
gbiavati deleted the copilot/fix-pre-commit-job-failure branch June 16, 2026 16:03
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