[py] Fix type annotations, make docstrings consistent, centralize dependencies#16821
Merged
cgoldberg merged 5 commits intoSeleniumHQ:trunkfrom Dec 31, 2025
Merged
[py] Fix type annotations, make docstrings consistent, centralize dependencies#16821cgoldberg merged 5 commits intoSeleniumHQ:trunkfrom
cgoldberg merged 5 commits intoSeleniumHQ:trunkfrom
Conversation
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
π Related Issues
#15697
π₯ What does this PR do?
This is another cleanup PR:
log_pathattribute inwebkitgtk.Serviceclasspyproject.tomlto keep them in a central locationmypytox environment totypecheck(more generic name because we might replace mypy)π Types of changes
PR Type
Enhancement, Bug fix
Description
Fix type annotations across service classes and remove unused imports
Centralize linting/typecheck/validation dependencies in
pyproject.tomlRename
mypytox environment totypecheckfor better generalityRemove deprecated
log_pathattribute fromwebkitgtk.ServiceStandardize docstrings across all service classes for consistency
Replace
ByTypewithstrtype hints in element finding methodsDiagram Walkthrough
File Walkthrough
8 files
Convert service_args to list typeΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒRemove IOBase import and fix type annotationsΒ Β Β Β Β Β Β Β Β Β Β ΒReplace UNDEFINED type with SentinelΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒRemove cast calls and fix log_output type hintsΒ Β Β Β Β Β Β Β Β ΒRemove ByType import and use str typeΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒRemove ByType import and use str typeΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒRemove ByType import and use str typeΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒUpdate type hints and standardize docstringΒ Β Β Β Β Β Β Β Β Β Β Β Β Β3 files
Standardize docstring format and parametersΒ Β Β Β Β Β Β Β Β Β Β Β Β ΒMove docstring from method to class levelΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒStandardize docstring format and parametersΒ Β Β Β Β Β Β Β Β Β Β Β Β Β1 files
Remove deprecated log_path and fix typesΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β2 files
Rename mypy environment to typecheckΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒUse dependency_groups and rename mypy environmentΒ Β Β Β Β Β Β Β3 files
Add dependency groups for lint/typecheck/validateΒ Β Β Β Β Β Β ΒAdd tox and related dependenciesΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒUpdate locked versions for new dependenciesΒ Β Β Β Β Β Β Β Β Β Β Β Β Β