Skip to content

chore: enable RUF002/RUF003 (ambiguous Unicode characters) #1005

Closed

Description

Context

PR #999 deferred RUF002 (ambiguous characters in docstrings, 8 violations) and RUF003 (ambiguous characters in comments, 14 violations) to avoid scope creep. These rules align with the repo's cross-platform ASCII encoding convention (.github/instructions/encoding.instructions.md).

Task

  1. Remove "RUF002" and "RUF003" from the ignore list in pyproject.toml
  2. Fix the 22 violations -- most are curly quotes or non-ASCII dashes that crept into docstrings/comments
  3. Run uv run ruff check src/ tests/ to confirm clean
  4. Verify no legitimate Unicode content is broken (e.g., user-facing strings with internationalised text)

Current violations

# To reproduce:
uv run ruff check --select RUF002,RUF003 src/ tests/

References

Activity

  1. added
    status/needs-triage
    on Apr 27, 2026
  2. github-actions commented on Apr 27, 2026

    @github-actions

    Triage decision

    accept

    Proposed labels

    area/ci-cd
    area/testing
    type/refactor
    status/accepted
    priority/low
    

    Milestone

    0.10.0

    Suggested next action

    Open a PR that removes "RUF002" and "RUF003" from the ignore list in pyproject.toml, fixes the 22 violations, and confirms a clean uv run ruff check src/ tests/ run.

    Suggested issue comment

    Thanks for the well-scoped follow-up to #999! Enabling RUF002 and RUF003 directly enforces our cross-platform ASCII encoding convention in an automated way, which is exactly the right move.
    
    Accepting this for 0.10.0. The steps in the issue body are the complete spec:
    
    1. Remove `"RUF002"` and `"RUF003"` from the `ignore` list in `pyproject.toml`.
    2. Fix the 22 violations (curly quotes, non-ASCII dashes in docstrings/comments).
    3. Confirm `uv run ruff check src/ tests/` exits clean.
    4. Double-check that no legitimate internationalised user-facing strings are caught (they should not be, since these rules only cover docstrings and comments, not string literals).
    
    If you'd like to take this on, a PR is welcome. The encoding convention doc at `.github/instructions/encoding.instructions.md` is the authoritative reference if you need to judge any edge case.

    Per-lens notes (collapsed)

    DevX UX Expert -- User-Need Reviewer

    The request maps cleanly to a contributor toolchain surface every developer touches: docstrings and inline comments. RUF002/RUF003 automate the encoding convention already codified in .github/instructions/encoding.instructions.md. PR #999 deferred these rules explicitly to avoid scope creep, making this a tracked follow-up with no ambiguity. The issue supplies exact reproduction steps, a violation count (22), and a clear acceptance criterion (clean ruff output). No CLI UX surface change; purely a contributor quality-gate improvement. Framing is aligned with the automated-quality-gate mental model that npm/pip/cargo contributors expect.

    Supply Chain Security Expert -- Risk-Surface Reviewer

    No risk-surface implication. RUF002/RUF003 operate on docstrings and comments only, not on executable code paths, lockfiles, MCP config trust boundaries, or authentication flows. Enabling them strictly reduces risk by preventing non-ASCII characters (potential homoglyph vectors) from entering reviewed source. No theme/security or theme/governance required; no security-domain area/* labels apply.

    OSS Growth Hacker -- Contributor-Tone Reviewer

    Not activated -- author is a COLLABORATOR with established familiarity with the project; no tone-tuning for a first-time contributor is needed.

    Python Architect -- Architecture Reviewer

    Not activated -- issue requires no cross-cutting design decision; the implementation is fully mechanical (edit pyproject.toml, fix 22 character violations, run ruff).

    Doc Writer -- Documentation Reviewer

    Not activated -- no user-facing feature or documentation surface change is implied by enabling two linting rules in pyproject.toml.

    APM CEO -- Triage Arbiter

    Clean accept. This is well-scoped tech debt filed by a COLLABORATOR who provided a complete spec. Both specialist lenses agree: real contributor-facing quality improvement, zero risk-surface implication. The issue is entirely infra-domain (linting config plus a mechanical source fix), so the theme/* label exemption applies -- no mega-theme label required. Milestone is 0.10.0, the active development bucket after 0.9.4 released 2026-04-26. Priority is low: the repo functions without this, but the fix removes a class of manual review burden permanently.

    {
      "decision": "accept",
      "decision_detail": "",
      "theme": null,
      "areas": ["area/ci-cd", "area/testing"],
      "type": "type/refactor",
      "status": "status/accepted",
      "priority": "priority/low",
      "preserved_labels": [],
      "milestone": "0.10.0",
      "next_action": "Open a PR that removes RUF002 and RUF003 from the ignore list in pyproject.toml, fixes the 22 violations, and confirms a clean uv run ruff check src/ tests/ run.",
      "comment_markdown": "Thanks for the well-scoped follow-up to #999! Enabling RUF002 and RUF003 directly enforces our cross-platform ASCII encoding convention in an automated way, which is exactly the right move.\n\nAccepting this for 0.10.0. The steps in the issue body are the complete spec:\n\n1. Remove `\"RUF002\"` and `\"RUF003\"` from the `ignore` list in `pyproject.toml`.\n2. Fix the 22 violations (curly quotes, non-ASCII dashes in docstrings/comments).\n3. Confirm `uv run ruff check src/ tests/` exits clean.\n4. Double-check that no legitimate internationalised user-facing strings are caught (they should not be, since these rules only cover docstrings and comments, not string literals).\n\nIf you'd like to take this on, a PR is welcome. The encoding convention doc at `.github/instructions/encoding.instructions.md` is the authoritative reference if you need to judge any edge case."
    }

    Triage status: agentic proposal pending human ratification.
    Silence is approval. Maintainers can:

    • Override any label or milestone above by editing it directly --
      human edits are authoritative and will not be reverted on
      subsequent runs.
    • Re-trigger triage by applying the status/needs-triage label, or
      by removing status/triaged to enroll the issue in the next
      daily sweep.

    Posted by the Triage Panel workflow. See .apm/skills/apm-triage-panel for the panel skill.

    Generated by Triage Panel for issue #1005 · ● 650K · ◷

  3. added
    area/ci-cd
    area/testing
    priority/low
    status/accepted
    status/triaged
    type/refactor
    and removed
    status/needs-triage
    on Apr 27, 2026
  4. added this to the 0.10.0 milestone on Apr 27, 2026
  5. added
    status/shepherding
    on Jun 2, 2026
  6. moved this from Todo to In Progress in APM Roadmapon Jun 2, 2026
  7. removed
    status/shepherding
    on Jun 2, 2026
  8. added a commit that references this issue on Jun 2, 2026
    b9eba81
  9. moved this from In Progress to Done in APM Roadmapon Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/ci-cdarea/testingpriority/lowstatus/acceptedstatus/triagedtech-debttype/refactor

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions