Skip to content

[py] Type BaseOptions.set_capability parameters - #18027

Merged
diemol merged 4 commits into
SeleniumHQ:trunkfrom
adamtheturtle:codex/type-set-capability
Sep 16, 2026
Merged

diemol merged 4 commits into
SeleniumHQ:trunkfrom
adamtheturtle:codex/type-set-capability

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🔗 Related Issues

None.

💥 What does this PR do?

Annotates BaseOptions.set_capability so strict Pyright consumers no longer see a partially unknown method type.

🔧 Implementation Notes

  • Type capability names as str.
  • Accept capability values as object because extension capabilities can contain heterogeneous user-supplied values and the method stores them unchanged.

Validation:

  • 55 targeted browser-options unit tests passed.
  • Ruff check and format check passed for the changed file.
  • Python compileall and git diff --check passed.
  • A strict Pyright consumer probe resolves the method as (name: str, value: object) -> None.

🤖 AI assistance

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s): OpenAI Codex
    • What was generated: Implementation suggestions, type-analysis probes, validation commands, and PR-description wording.
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

This is annotation-only and does not change runtime behavior.

🔄 Types of changes

  • Cleanup (type annotations)

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@selenium-ci selenium-ci added the C-py Python Bindings label Sep 12, 2026
@diemol

diemol commented Sep 14, 2026

Copy link
Copy Markdown
Member

@adamtheturtle can you check the PR description? Looks like the formar went wrong. Also, can you please follow the PR template?

@adamtheturtle

Copy link
Copy Markdown
Contributor Author

Thanks — I fixed the formatting and rewrote the description using the current PR template, including the AI-assistance disclosure.

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can group findings by type and pick your Finding display, from Minimal to Full

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

No code changes since the last review — review skipped

Qodo Logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-py Python Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants