Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[py] Type hint cleanup#15917

Merged
cgoldberg merged 1 commit intoSeleniumHQ:trunkfrom
cgoldberg:type-hint-cleanup
Jun 19, 2025
Merged

[py] Type hint cleanup#15917
cgoldberg merged 1 commit intoSeleniumHQ:trunkfrom
cgoldberg:type-hint-cleanup

Conversation

@cgoldberg
Copy link
Member

@cgoldberg cgoldberg commented Jun 19, 2025

User description

πŸ’₯ What does this PR do?

This PR moves some types from typing to collections.abc, and replaces some type hints with native data types.

πŸ”„ Types of changes

  • Cleanup (formatting, renaming)
  • Bug fix (backwards compatible)

PR Type

Other


Description

β€’ Modernize type hints by moving from typing to collections.abc
β€’ Replace generic type hints with native Python data types
β€’ Consolidate import statements for better organization


Changes walkthrough πŸ“

Relevant files
Formatting
1 files
generate_api_module_listing.py
Replace set() with set comprehensionΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+1/-1Β  Β  Β 
Enhancement
10 files
service.py
Move Sequence from typing to collections.abcΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+2/-2Β  Β  Β 
service.py
Move Sequence from typing to collections.abcΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+2/-2Β  Β  Β 
script.py
Replace Dict/List with native dict/list typesΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+14/-14Β 
service.py
Move Sequence from typing to collections.abcΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+2/-2Β  Β  Β 
service.py
Move Sequence from typing to collections.abcΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+2/-2Β  Β  Β 
service.py
Move Sequence from typing to collections.abcΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+2/-1Β  Β  Β 
webdriver.py
Replace Dict/Type with native dict/type hintsΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+6/-6Β  Β  Β 
service.py
Move Sequence from typing to collections.abcΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+2/-2Β  Β  Β 
service.py
Move Sequence from typing to collections.abcΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+2/-2Β  Β  Β 
service.py
Move Sequence from typing to collections.abcΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
+2/-2Β  Β  Β 

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @selenium-ci selenium-ci added C-py Python Bindings B-devtools Includes everything BiDi or Chrome DevTools related labels Jun 19, 2025
    @qodo-code-review
    Copy link
    Contributor

    qodo-code-review bot commented Jun 19, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @cgoldberg cgoldberg force-pushed the type-hint-cleanup branch from 7d9e379 to e6081cb Compare June 19, 2025 21:33
    @SeleniumHQ SeleniumHQ deleted a comment from qodo-code-review bot Jun 19, 2025
    @cgoldberg cgoldberg merged commit c187279 into SeleniumHQ:trunk Jun 19, 2025
    3 of 4 checks passed
    @cgoldberg cgoldberg deleted the type-hint-cleanup branch June 19, 2025 21:35
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    B-devtools Includes everything BiDi or Chrome DevTools related C-py Python Bindings Review effort 2/5

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants