Skip to content

PYTHON-6250 Enable ruff N rules - #3210

Merged
NoahStapp merged 2 commits into
mongodb:mainfrom
NoahStapp:PYTHON-6250
Nov 11, 2026
Merged

NoahStapp merged 2 commits into
mongodb:mainfrom
NoahStapp:PYTHON-6250

Conversation

@NoahStapp

Copy link
Copy Markdown
Contributor

PYTHON-6250

Changes in this PR

Enable ruff's N linting rules and make the necessary code changes to have them pass.

Test Plan

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)?
  • Is there test coverage?
  • Is any followup work tracked in a JIRA ticket? If so, add link(s).

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

@NoahStapp
NoahStapp requested a review from a team as a code owner November 11, 2026 18:44
@NoahStapp
NoahStapp requested review from sleepyStick and a balanced review from Copilot November 11, 2026 18:44

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

🔵 Needs a closer look

The bootstrap script’s annotations future import fails on Python 3.6 hosts, blocking dependency setup before it can select the project interpreter.

No open issues 🎉

What changed in this PR

Enables Ruff’s N naming rules and updates Evergreen Python script names and their references to use underscores.

Changes:

  • Removes the blanket naming-rule exemption and updates the bootstrap script’s lint exemption path.
  • Updates shell callers and contributor instructions for the renamed scripts.
  • Adds a future-annotations import to the bootstrap script.
File Description
pyproject.toml Enables naming rules and updates the script exemption path.
CONTRIBUTING.md Updates local spec-sync instructions.
.evergreen/​scripts/​setup_uv.py Updates the docstring and adds the annotations import.
.evergreen/​scripts/​resync-all-specs.sh Invokes the underscore-named spec-sync script.
.evergreen/​scripts/​resync_all_specs.py Provides spec-sync automation under the updated filename.
.evergreen/​scripts/​install-dependencies.sh Updates the bootstrap path and related comments.
.evergreen/​scripts/​configure-env.sh Updates a bootstrap filename in a comment only.

Review effort: Balanced

@NoahStapp
NoahStapp merged commit 4569bb8 into mongodb:main Nov 11, 2026
31 of 33 checks passed
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.

3 participants