Skip to content

fix: resolve Ruff 0.16.0 lint/format violations - #169

Merged
3asm merged 2 commits into
mainfrom
fix/os-35977
Aug 1, 2026
Merged

3asm merged 2 commits into
mainfrom
fix/os-35977

Conversation

@ticket-fixer

@ticket-fixer ticket-fixer Bot commented Jul 31, 2026

Copy link
Copy Markdown

This PR resolves the Ruff 0.16.0 lint/format violations reported by CI for this agent, as part of ticket os-35977.

Changes

  • Applied ruff check --fix and ruff format (ruff 0.16.0); manually fixed the non-autofixable RUF059 (renamed an unused unpacked variable to _kwargs). Behavior-preserving.

Fixed rule codes (count)

  • I001: 4, RUF010: 2, RUF059: 1, UP006: 12, UP007: 6, UP035: 3, UP045: 11

⚠️ Blocker — workflow migration could not be included

Ticket os-35977 also asks to migrate .github/workflows/lint_format_checker.yaml from chartboost/ruff-action@v1 to astral-sh/ruff-action@v3 (pin version: 0.16.0). This could not be pushed: the automation GitHub App token lacks the workflows permission, so GitHub rejects any push that modifies .github/workflows/*.yml.

A maintainer with workflows permission must apply that workflow change separately.

No blanket noqa, per-file ignores, or rule additions were used. No behavior-affecting changes were made.

Fixes ticket https://report.ostorlab.co/o/os/remediation/tickets/os-35977

Migrate the lint/format CI workflow from chartboost/ruff-action@v1 to
astral-sh/ruff-action@v3 and pin ruff to 0.16.0 for reproducible CI.
Apply ruff check --fix and ruff format to resolve 0.16.0 lint/format
violations (typing modernization, import sorting, formatting).

Fixes ticket https://report.ostorlab.co/o/os/remediation/tickets/os-35977
@ticket-fixer
ticket-fixer Bot requested a review from a team July 31, 2026 14:22

@ostorlab-ai-pr-review ostorlab-ai-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review Summary

Total Issues Found: 1
Critical Issues: 0
Suggestions: 1

Key Findings:
The code review identified one minor style issue related to import formatting. Ruff's I001 auto-fix combined imports from the same module, which violates the project's convention of keeping imports on separate lines. No critical issues were found, and the overall code quality is good. It is recommended to revert the import change to separate lines and adjust Ruff's configuration (e.g., using noqa or updating [tool.ruff.lint.isort]) to prevent future auto-formatting violations.


from agent import definitions
from agent import whatweb_utils
from agent import definitions, whatweb_utils

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Style: The project's coding convention states: "Imports should be one-line per symbol and never be grouped from the same module." The original code correctly had these as two separate lines. Ruff's I001 auto-fix combined them, but this violates the convention. Please revert to separate import lines (from agent import definitions and from agent import whatweb_utils on separate lines). You may need to add a noqa: I001 comment or configure ruff's [tool.ruff.lint.isort] section with combine-as-imports = false / split-on-trailing-comma = true to prevent ruff from re-combining them on subsequent runs.

@3asm
3asm merged commit 43f590f into main Aug 1, 2026
5 checks passed
@3asm
3asm deleted the fix/os-35977 branch August 1, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants