Skip to content

[py] Type hint cleanup #15917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2025
Merged

Conversation

cgoldberg
Copy link
Contributor

@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
    Copy link
    Contributor

    qodo-merge-pro 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-merge-pro 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