Skip to content

Fix A002: rename id parameter to avoid shadowing built-in, remove suppression#251

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-linter-error-a002-again
Draft

Fix A002: rename id parameter to avoid shadowing built-in, remove suppression#251
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-linter-error-a002-again

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

A002 (function argument shadows a Python built-in) was globally suppressed in pyproject.toml rather than fixed. All four violations were in the vendored jsonrpyc Spec class, which used id as a parameter name.

Changes

  • jsonrpyc/__init__.py — Renamed the id parameter to id_ (PEP convention) in Spec.check_id, Spec.request, Spec.response, and Spec.error; updated all internal usages and the one keyword call site:
    # before
    req = Spec.request(method, id=id, params=params)
    # after
    req = Spec.request(method, id_=id, params=params)
  • pyproject.toml — Removed "A002" from [tool.ruff.lint] ignore.

Copilot AI review requested due to automatic review settings June 1, 2026 13:35
Copilot AI review requested due to automatic review settings June 1, 2026 13:35
Copilot AI linked an issue Jun 1, 2026 that may be closed by this pull request
Copilot AI requested review from Copilot and removed request for Copilot June 1, 2026 13:41
Copilot AI changed the title [WIP] Fix linter error A002 and remove from suppression list Fix A002: rename id parameter to avoid shadowing built-in, remove suppression Jun 1, 2026
Copilot AI requested a review from kevinbackhouse June 1, 2026 13:43

@p- p- 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.

This somehow changed code in jsonrpyc

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.

A002

3 participants