Skip to content

Add usethis-python-ruff agent skill#1522

Merged
nathanjmcdougall merged 2 commits into
mainfrom
copilot/usethis-python-ruff-compliance
Mar 25, 2026
Merged

Add usethis-python-ruff agent skill#1522
nathanjmcdougall merged 2 commits into
mainfrom
copilot/usethis-python-ruff-compliance

Conversation

Copilot AI commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Agents were suppressing Ruff rules with bare # noqa comments (e.g. # noqa: TC001) instead of actually fixing the code. This came up in #1510 where a TC001 was suppressed rather than moving the import out of TYPE_CHECKING.

New agent skill usethis-python-ruff with three rules:

  • Auto-fix first — run uv run ruff check --fix --unsafe-fixes before considering suppression
  • Never-suppress listTC rules must always be fixed, never suppressed
  • Require justification — any # noqa must include an explanatory comment
Original prompt

This section details on the original issue you should resolve

<issue_title>Agent skill to comply with ruff rules</issue_title>
<issue_description>usethis-python-ruff

We should avoid supressing rules inline like #noqa: TC001 without an explanatory comment. And we should avoid doing so at all if we can actually comply with the rule by running uv run ruff --fix --unsafe-fixes, which we often can!

There are some rules we should NEVER suppress - for now just mention that TC rule codes never be suppressed.

This came up in #1510</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Implement agent skill to comply with ruff rules Add usethis-python-ruff agent skill Mar 25, 2026
Copilot AI requested a review from nathanjmcdougall March 25, 2026 02:48
@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review March 25, 2026 02:54
@nathanjmcdougall nathanjmcdougall merged commit b51510a into main Mar 25, 2026
@nathanjmcdougall nathanjmcdougall deleted the copilot/usethis-python-ruff-compliance branch March 25, 2026 02:54
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.

Agent skill to comply with ruff rules

2 participants