Skip to content

Add pyupgrade to the pre-commit/CI path - #240

Merged
schwehr merged 4 commits into
mainfrom
copilot/setup-pyupgrade-checks
Sep 21, 2026
Merged

schwehr merged 4 commits into
mainfrom
copilot/setup-pyupgrade-checks

Conversation

Copilot AI commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

This wires pyupgrade into the existing pre-commit workflow instead of adding a separate periodic check. The repository now enforces syntax modernization on every PR/push via the current CI pre-commit step, while keeping a direct local invocation path for developers.

  • Pre-commit integration

    • Adds pyupgrade to .pre-commit-config.yaml
    • Targets the repo baseline with --py314-plus
  • Developer workflow

    • Documents that pyupgrade runs as part of the normal pre-commit suite
    • Documents an explicit on-demand command for local use
  • Repository alignment

    • Includes the immediate auto-fix required by the new rule in BitVector/BitVector.py so the hook passes when enabled
- repo: https://github.com/asottile/pyupgrade
  rev: v3.21.2
  hooks:
    - id: pyupgrade
      args: [ --py314-plus ]

Copilot AI lite review requested due to automatic review settings September 21, 2026 18:54

Copilot AI 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.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI linked an issue Sep 21, 2026 that may be closed by this pull request
Co-authored-by: schwehr <389869+schwehr@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 21, 2026 18:57
Co-authored-by: schwehr <389869+schwehr@users.noreply.github.com>

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Configure the hook for Python 3.14 to match the project’s supported language level.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)

Comment thread .pre-commit-config.yaml Outdated
Copilot AI review requested due to automatic review settings September 21, 2026 18:59
Copilot AI changed the title [WIP] Add configuration for pyupgrade checks Add pyupgrade to the pre-commit/CI path Sep 21, 2026
Copilot AI requested a review from schwehr September 21, 2026 19:00

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

No unresolved review issues remain.

Review effort: Lite
Findings: None

Resolved since last review (1)

@schwehr
schwehr requested a lite review from Copilot September 21, 2026 19:12
@schwehr
schwehr marked this pull request as ready for review September 21, 2026 19:13

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

Only minor documentation wording nits remain; no blocking issues were identified.

Review effort: Lite
Findings: None

Co-authored-by: schwehr <389869+schwehr@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 21, 2026 19:35

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

Restore postponed annotation evaluation or quote forward references to prevent import-time NameError.

Review effort: Lite
Findings: None

@schwehr
schwehr merged commit fc39fe0 into main Sep 21, 2026
9 checks passed
@schwehr
schwehr deleted the copilot/setup-pyupgrade-checks branch September 21, 2026 19:44
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.

pyupgrade checks

3 participants