Skip to content

[py] Replace //py:ruff with dedicated ruff-format and ruff-check targets#16998

Merged
titusfortner merged 6 commits intotrunkfrom
ruff
Jan 25, 2026
Merged

[py] Replace //py:ruff with dedicated ruff-format and ruff-check targets#16998
titusfortner merged 6 commits intotrunkfrom
ruff

Conversation

@titusfortner
Copy link
Member

@titusfortner titusfortner commented Jan 24, 2026

User description

The generic ruff target had unnecessary complicated logic for format vs check. This way we can pass the desired arguments directly where we want them

💥 What does this PR do?

Replaces //py:ruff with dedicated targets:

  • bazel run //py:ruff-format -- [args] - format, passes args to ruff format
  • bazel run //py:ruff-check -- [args] - lint, passes args to ruff check

Also fixed bug where we were only checking external directories, not adding them to checking py directory (#16957)

Rake task changes:

  • New py:format task using //py:ruff-format
  • Updated py:lint to run format, then check with --fix --show-fixes, then mypy (and will modify files)

Script changes:

  • scripts/format.sh and scripts/format.ps1 now use //py:ruff-format

🔧 Implementation Notes

Two dedicated scripts that pass args directly to ruff, allowing full control (e.g., --check for CI verification, --fix for auto-fixing).

Current CI:

  • formatting is enforced via the ci-lint workflow that runs scripts/format.sh
  • linting is enforced via the ci-python workflow lint job that runs ruff-check).

💡 Additional Considerations

This is part of a larger effort to add consistent :format and :lint tasks across all language bindings.

🔄 Types of changes

  • New feature (non-breaking change which adds functionality)
  • Bug fix (backwards compatible)

PR Type

Enhancement, Bug fix


Description

  • Split monolithic ruff target into dedicated format and check targets

  • Fixed bug where py directory was excluded from linting checks

  • Updated rake tasks and scripts to use new ruff-format and ruff-check targets

  • Applied ruff formatting fixes across 60+ test files (import statement cleanup)


Diagram Walkthrough

flowchart LR
  A["//py:ruff<br/>monolithic target"] -->|split| B["//py:ruff-check<br/>linting only"]
  A -->|split| C["//py:ruff-format<br/>formatting only"]
  B --> D["py:lint rake task<br/>format + check + mypy"]
  C --> E["py:format rake task<br/>format only"]
  F["scripts/format.sh<br/>scripts/format.ps1"] -->|updated| C
  G["py directory"] -->|now included| B
Loading

File Walkthrough

Relevant files
Enhancement
3 files
ruff_check.py
Simplified ruff check runner with py directory inclusion 
+13/-17 
ruff_format.py
New dedicated ruff format runner script                                   
+50/-0   
python.rake
Updated py:lint and added py:format rake tasks                     
+13/-5   
Configuration changes
4 files
BUILD.bazel
Replaced ruff alias with ruff-check and ruff-format           
+7/-2     
BUILD.bazel
Split ruff binary into ruff_check and ruff_format               
+13/-2   
format.sh
Updated to use ruff-format target                                               
+1/-1     
format.ps1
Updated to use ruff-format target                                               
+1/-1     
Formatting
70 files
chrome_network_emulation_tests.py
Removed blank line after pytest import                                     
+0/-1     
chrome_service_tests.py
Removed blank line after pytest import                                     
+0/-1     
alerts_tests.py
Removed blank line after pytest import                                     
+0/-1     
api_example_tests.py
Removed blank line after pytest import                                     
+0/-1     
bidi_browser_tests.py
Removed blank line after pytest import                                     
+0/-1     
bidi_browsing_context_tests.py
Removed blank line after pytest import                                     
+0/-1     
bidi_emulation_tests.py
Removed blank line after pytest import                                     
+0/-1     
bidi_input_tests.py
Removed blank line after pytest import                                     
+0/-1     
bidi_network_tests.py
Removed blank line after pytest import                                     
+0/-1     
bidi_permissions_tests.py
Removed blank line after pytest import                                     
+0/-1     
bidi_script_tests.py
Removed blank line after pytest import                                     
+0/-1     
bidi_session_tests.py
Removed blank line after pytest import                                     
+0/-1     
bidi_storage_tests.py
Removed blank line after pytest import                                     
+0/-1     
bidi_webextension_tests.py
Removed blank line after import statement                               
+0/-1     
children_finding_tests.py
Removed blank line after pytest import                                     
+0/-1     
clear_tests.py
Removed blank line after pytest import                                     
+0/-1     
click_scrolling_tests.py
Removed blank line after pytest import                                     
+0/-1     
click_tests.py
Removed blank line after pytest import                                     
+0/-1     
correct_event_firing_tests.py
Removed blank line after pytest import                                     
+0/-1     
devtools_tests.py
Removed blank line after pytest import                                     
+0/-1     
driver_element_finding_tests.py
Removed blank line after pytest import                                     
+0/-1     
element_aria_label_tests.py
Removed blank line after pytest import                                     
+0/-1     
element_aria_tests.py
Removed blank line after pytest import                                     
+0/-1     
element_attribute_tests.py
Removed blank line after pytest import                                     
+0/-1     
executing_async_javascript_tests.py
Removed blank line after pytest import                                     
+0/-1     
executing_javascript_tests.py
Removed blank line after pytest import                                     
+0/-1     
fedcm_tests.py
Removed blank line after pytest import                                     
+0/-1     
form_handling_tests.py
Removed blank line after pytest import                                     
+0/-1     
frame_switching_tests.py
Removed blank line after pytest import                                     
+0/-1     
google_one_box.py
Removed blank line after import statement                               
+0/-1     
implicit_waits_tests.py
Removed blank line after pytest import                                     
+0/-1     
interactions_tests.py
Removed blank line after pytest import                                     
+0/-1     
interactions_with_device_tests.py
Removed blank line after pytest import                                     
+0/-1     
opacity_tests.py
Removed blank line after pytest import                                     
+0/-1     
page_load_timeout_tests.py
Removed blank line after pytest import                                     
+0/-1     
position_and_size_tests.py
Removed blank line after pytest import                                     
+0/-1     
print_pdf_tests.py
Removed blank line after pytest import                                     
+0/-1     
proxy_tests.py
Removed blank line after pytest import                                     
+0/-1     
rendered_webelement_tests.py
Removed blank line after pytest import                                     
+0/-1     
script_pinning_tests.py
Removed blank line after pytest import                                     
+0/-1     
select_class_tests.py
Removed blank line after pytest import                                     
+0/-1     
stale_reference_tests.py
Removed blank line after pytest import                                     
+0/-1     
takes_screenshots_tests.py
Removed blank line after pytest import                                     
+0/-1     
text_handling_tests.py
Removed blank line after pytest import                                     
+0/-1     
timeout_tests.py
Removed blank line after pytest import                                     
+0/-1     
typing_tests.py
Removed blank line after pytest import                                     
+0/-1     
upload_tests.py
Removed blank line after pytest import                                     
+0/-1     
virtual_authenticator_tests.py
Removed blank line after pytest import                                     
+0/-1     
visibility_tests.py
Removed blank line after pytest import                                     
+0/-1     
w3c_interaction_tests.py
Removed blank line after pytest import                                     
+0/-1     
web_components_tests.py
Removed blank line after pytest import                                     
+0/-1     
webdriverwait_tests.py
Reorganized imports for consistency                                           
+1/-2     
window_switching_tests.py
Removed blank line after pytest import                                     
+0/-1     
window_tests.py
Removed blank line after pytest import                                     
+0/-1     
edge_service_tests.py
Removed blank line after pytest import                                     
+0/-1     
ff_installs_addons_tests.py
Removed blank line after import statement                               
+0/-1     
firefox_context_tests.py
Removed blank line after pytest import                                     
+0/-1     
firefox_service_tests.py
Removed blank line after pytest import                                     
+0/-1     
firefox_sizing_tests.py
Removed blank line after pytest import                                     
+0/-1     
remote_connection_tests.py
Reorganized imports for consistency                                           
+1/-2     
remote_custom_element_tests.py
Removed blank line after pytest import                                     
+0/-1     
remote_custom_locator_tests.py
Removed blank line after pytest import                                     
+0/-1     
remote_downloads_tests.py
Removed blank line after pytest import                                     
+0/-1     
remote_hub_connection.py
Removed blank line after import statement                               
+0/-1     
remote_server_tests.py
Removed blank line after pytest import                                     
+0/-1     
remote_tests.py
Removed blank line after pytest import                                     
+0/-1     
conftest.py
Removed blank line after pytest import                                     
+0/-1     
launcher_tests.py
Removed blank line after pytest import                                     
+0/-1     
safari_service_tests.py
Removed blank line after pytest import                                     
+0/-1     
event_firing_webdriver_tests.py
Removed blank line after pytest import                                     
+0/-1     
Additional files
20 files
expected_conditions_tests.py +0/-1     
relative_by_tests.py +0/-1     
chrome_options_tests.py +0/-1     
common_options_tests.py +0/-1     
driver_finder_tests.py +0/-1     
dialog_tests.py +0/-1     
print_page_options_tests.py +0/-1     
selenium_manager_tests.py +0/-1     
edge_options_tests.py +0/-1     
firefox_options_tests.py +0/-1     
test_ie_options.py +0/-1     
error_handler_tests.py +0/-1     
new_session_tests.py +0/-1     
remote_connection_tests.py +3/-4     
remote_server_tests.py +0/-1     
safari_options_tests.py +0/-1     
credentials_tests.py +0/-1     
virtual_authenticator_options_tests.py +0/-1     
webkitgtk_options_tests.py +0/-1     
wpewebkit_options_tests.py +0/-1     

@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 Jan 24, 2026
@selenium-ci
Copy link
Member

Thank you, @titusfortner 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

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 24, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Missing failure handling: The new ruff runners assume BUILD_WORKSPACE_DIRECTORY and the ruff runfile always exist
and do not handle missing/invalid environment or runfile resolution failures with
actionable errors.

Referred Code
r = Runfiles.Create()
ruff = r.Rlocation("rules_multitool++multitool+multitool/tools/ruff/ruff")

os.chdir(os.environ["BUILD_WORKSPACE_DIRECTORY"])

exclude_args = []
for pattern in EXCLUDES:
    exclude_args.extend(["--exclude", pattern])

sys.exit(run_check(ruff, exclude_args, ALL_DIRS, sys.argv[1:]))

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 24, 2026

PR Code Suggestions ✨

Latest suggestions up to 95e420e

CategorySuggestion                                                                                                                                    Impact
Possible issue
Validate tool path resolution

Add validation to ensure Runfiles.Create() succeeds and r.Rlocation() finds the
ruff binary before use, preventing potential script crashes.

py/private/ruff_check.py [41-42]

 r = Runfiles.Create()
+if not r:
+    print("Error: unable to initialize Bazel runfiles", file=sys.stderr)
+    sys.exit(1)
 ruff = r.Rlocation("rules_multitool++multitool+multitool/tools/ruff/ruff")
+if not ruff:
+    print("Error: ruff binary not found in runfiles", file=sys.stderr)
+    sys.exit(1)
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion improves the script's robustness by adding checks for Runfiles.Create() and r.Rlocation() failures, which prevents potential crashes and provides clearer error messages.

Low
Reject duplicate subcommand args

Add a check to prevent users from passing a ruff subcommand like check or format
as an argument, as the script already hardcodes the check subcommand.

py/private/ruff_check.py [50]

-sys.exit(run_check(ruff, exclude_args, ALL_DIRS, sys.argv[1:]))
+extra_args = sys.argv[1:]
+if extra_args and extra_args[0] in {"check", "format"}:
+    print(
+        "Error: do not pass a ruff subcommand; this target already runs `ruff check`. "
+        "Pass only flags after `--`.",
+        file=sys.stderr,
+    )
+    sys.exit(2)
 
+sys.exit(run_check(ruff, exclude_args, ALL_DIRS, extra_args))
+
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion improves user experience by adding a guard against a common mistake of passing a subcommand that is already hardcoded, providing a more helpful error message.

Low
Learned
best practice
Centralize duplicated configuration

Move shared configuration like directories/excludes (and ideally shared command
construction) into a small shared helper module used by both ruff scripts, so
updates don’t need to be made in two places.

py/private/ruff_check.py [30-31]

-ALL_DIRS = ["py", "scripts", "common", "dotnet", "java", "javascript", "rb"]
-EXCLUDES = ["**/node_modules/**", "**/.bundle/**"]
+from .ruff_common import ALL_DIRS, EXCLUDES
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why:
Relevant best practice - Reduce duplication by centralizing shared behavior to avoid drift between parallel implementations.

Low
Validate external executable path

Guard against Rlocation(...) returning None/empty and verify the resolved ruff
path exists before using it, so the script fails with a clear error when
runfiles are misconfigured.

py/private/ruff_format.py [41-42]

 r = Runfiles.Create()
 ruff = r.Rlocation("rules_multitool++multitool+multitool/tools/ruff/ruff")
+if not ruff or not os.path.exists(ruff):
+    print("Error: ruff executable not found in runfiles", file=sys.stderr)
+    sys.exit(1)
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why:
Relevant best practice - Add explicit validation/guards at integration boundaries (e.g., Runfiles lookups) before using returned paths.

Low
  • More

Previous suggestions

Suggestions up to commit e303ab5
CategorySuggestion                                                                                                                                    Impact
General
Validate workspace env var

Check for the existence of the BUILD_WORKSPACE_DIRECTORY environment variable
and exit with an error if it is not set.

py/private/ruff_check.py [44]

-os.chdir(os.environ["BUILD_WORKSPACE_DIRECTORY"])
+workspace = os.environ.get("BUILD_WORKSPACE_DIRECTORY")
+if not workspace:
+    print("Error: BUILD_WORKSPACE_DIRECTORY not set", file=sys.stderr)
+    sys.exit(1)
+os.chdir(workspace)
Suggestion importance[1-10]: 5

__

Why: This suggestion improves the script's robustness by adding an explicit check for the BUILD_WORKSPACE_DIRECTORY environment variable and providing a clear error message if it's missing.

Low
Handle potential errors during subprocess execution

Add a try...except block around the subprocess.run call in run_check to handle
potential OSError exceptions, preventing the script from crashing if ruff fails
to execute.

py/private/ruff_check.py [34-37]

 def run_check(ruff, exclude_args, dirs, extra_args):
     """Run ruff check (linting)."""
     cmd = [ruff, "check", "--config=py/pyproject.toml"]
-    return subprocess.run(cmd + exclude_args + dirs + extra_args).returncode
+    try:
+        return subprocess.run(cmd + exclude_args + dirs + extra_args, check=True).returncode
+    except (OSError, subprocess.CalledProcessError) as e:
+        print(f"Error running ruff check: {e}", file=sys.stderr)
+        return 1
Suggestion importance[1-10]: 3

__

Why: The suggestion correctly identifies an unhandled OSError but the proposed improved_code incorrectly handles CalledProcessError, which would mask the linter's exit code.

Low

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR splits the previous monolithic Bazel //py:ruff target into dedicated //py:ruff-format and //py:ruff-check targets, updates developer tooling to use them, and adjusts Ruff scope to include py/ alongside other Python-containing directories.

Changes:

  • Add dedicated Ruff runner scripts/targets for ruff format and ruff check.
  • Update Rake tasks and formatting scripts to call the new targets.
  • Apply Ruff-driven formatting cleanup across many Python test files (mostly import-spacing).

Reviewed changes

Copilot reviewed 98 out of 98 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/ci-python.yml Switch CI lint command to //py:ruff-check.
rake_tasks/python.rake Add py:format task; update py:lint flow to format → check → mypy.
scripts/format.ps1 Use //py:ruff-format for Python formatting in the repo formatter script.
scripts/format.sh Use //py:ruff-format for Python formatting in the repo formatter script.
py/BUILD.bazel Replace //py:ruff alias with ruff-check and ruff-format aliases.
py/private/BUILD.bazel Split py_binary into ruff_check and ruff_format.
py/private/ruff_check.py New simplified Ruff “check” runner; now includes py/ plus external dirs.
py/private/ruff_format.py New Ruff “format” runner for py/ plus external dirs.
py/test/selenium/webdriver/common/alerts_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/api_example_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/bidi_browser_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/bidi_browsing_context_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/bidi_emulation_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/bidi_input_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/bidi_network_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/bidi_permissions_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/bidi_script_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/bidi_session_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/bidi_storage_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/bidi_webextension_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/children_finding_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/clear_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/click_scrolling_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/click_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/correct_event_firing_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/devtools_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/driver_element_finding_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/element_aria_label_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/element_aria_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/element_attribute_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/executing_async_javascript_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/executing_javascript_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/fedcm_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/form_handling_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/frame_switching_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/google_one_box.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/implicit_waits_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/interactions_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/interactions_with_device_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/opacity_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/page_load_timeout_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/position_and_size_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/print_pdf_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/proxy_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/rendered_webelement_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/script_pinning_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/select_class_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/stale_reference_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/takes_screenshots_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/text_handling_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/timeout_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/typing_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/upload_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/virtual_authenticator_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/visibility_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/w3c_interaction_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/web_components_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/webdriverwait_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/window_switching_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/common/window_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/edge/edge_service_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/firefox/ff_installs_addons_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/firefox/firefox_context_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/firefox/firefox_service_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/firefox/firefox_sizing_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/remote/remote_connection_tests.py Ruff formatting (import ordering/whitespace).
py/test/selenium/webdriver/remote/remote_downloads_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/remote/remote_hub_connection.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/remote/remote_server_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/remote/remote_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/safari/conftest.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/safari/launcher_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/safari/safari_service_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/support/event_firing_webdriver_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/support/expected_conditions_tests.py Ruff formatting (import whitespace).
py/test/selenium/webdriver/support/relative_by_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/chrome/chrome_options_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/common/common_options_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/common/driver_finder_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/common/fedcm/dialog_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/common/print_page_options_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/common/selenium_manager_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/edge/edge_options_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/firefox/firefox_options_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/ie/test_ie_options.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/remote/error_handler_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/remote/new_session_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/remote/remote_connection_tests.py Ruff formatting (import ordering/whitespace).
py/test/unit/selenium/webdriver/remote/remote_server_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/safari/safari_options_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/virtual_authenticator/credentials_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/virtual_authenticator/virtual_authenticator_options_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/webkitgtk/webkitgtk_options_tests.py Ruff formatting (import whitespace).
py/test/unit/selenium/webdriver/wpewebkit/wpewebkit_options_tests.py Ruff formatting (import whitespace).

Copy link
Member

@cgoldberg cgoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this remove the extra line separating the import groups from every file? If I run ruff check against this branch, it will show me 90 errors... and if I run ruff check --fix, it will add them back.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

Copy link
Member

@cgoldberg cgoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks better

@titusfortner titusfortner merged commit cb8baea into trunk Jan 25, 2026
46 checks passed
@titusfortner titusfortner deleted the ruff branch January 25, 2026 19:47
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 Review effort 3/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants