Skip to content

[py] Adopt all Ruff PERF and PYI rules - #18181

Open
goldpanth3r wants to merge 3 commits into
SeleniumHQ:trunkfrom
goldpanth3r:fix-perf-
Open

goldpanth3r wants to merge 3 commits into
SeleniumHQ:trunkfrom
goldpanth3r:fix-perf-

Conversation

@goldpanth3r

@goldpanth3r goldpanth3r commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🔗 Related Issues

Related to #17989

💥 What does this PR do?

Adopts the Ruff PERF from Tranche 1 and PYI from Tranche 2 rule sets for the Python bindings.

  • Enables PERF401, PERF403, PYI032 and PYI034 and fixes the code they flag.
  • Ignores PERF203, PYI021.

🤖 AI assistance

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s):
    • What was generated:
    • I reviewed all AI output and can explain the change

🔄 Types of changes

  • New feature (non-breaking change which adds functionality and tests!)

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@selenium-ci selenium-ci added C-py Python Bindings B-build Includes scripting, bazel and CI integrations B-support Issue or PR related to support classes labels Oct 14, 2026
@selenium-ci

Copy link
Copy Markdown
Member

Thank you, @goldpanth3r for this code suggestion.

The support packages contain example code that many users find helpful, but they do not necessarily represent
the best practices for using Selenium, and the Selenium team is not currently merging changes to them.

After reviewing the change, unless it is a critical fix or a feature that is needed for Selenium
to work, we will likely close the PR.

We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks.
If you have any questions, please contact us

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations B-support Issue or PR related to support classes C-py Python Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants