[py] Convert all relative imports to absolute imports#16311
Merged
cgoldberg merged 3 commits intoSeleniumHQ:trunkfrom Sep 10, 2025
Merged
[py] Convert all relative imports to absolute imports#16311cgoldberg merged 3 commits intoSeleniumHQ:trunkfrom
cgoldberg merged 3 commits intoSeleniumHQ:trunkfrom
Conversation
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
💥 What does this PR do?
This PR converts all relative imports used in the Python bindings to absolute imports and adds a ruff linting rule to disallow them in the future.
Previously, we used a mix of relative and absolute imports. This unifies how we import modules using the preferred method.
🔄 Types of changes
PR Type
Other
Description
Convert all relative imports to absolute imports
Add ruff linting rule to prevent future relative imports
Standardize import style across Python bindings
Diagram Walkthrough
File Walkthrough
31 files
Convert relative exception imports to absoluteConvert all webdriver relative imports to absoluteConvert chrome options and service importsConvert action chain relative imports to absoluteConvert action builder relative imports to absoluteConvert input device import to absoluteConvert key action relative imports to absoluteConvert key input relative imports to absoluteConvert pointer action relative imports to absoluteConvert pointer input relative imports to absoluteConvert wheel action relative imports to absoluteConvert wheel input relative imports to absoluteConvert session import to absoluteConvert log and session imports to absoluteConvert account import to absoluteConvert edge options and service importsConvert firefox relative imports to absoluteConvert IE options and service importsConvert command import to absoluteConvert command import to absoluteConvert remote module relative imports to absoluteConvert by and command imports to absoluteConvert command import to absoluteConvert all remote webdriver relative importsConvert command and shadowroot imports to absoluteConvert safari relative imports to absoluteConvert event listener import to absoluteConvert support module imports to absoluteConvert select and wait imports to absoluteConvert webkitgtk options and service importsConvert wpewebkit options and service imports1 files
Add TID252 rule to prevent relative imports