selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[rb] Expand RBS typing support by replacing untypes with precise typing

Open aguspe opened this issue 1 year ago • 0 comments

Description

This PR replaces the untyped types for the precise types in all of the RBS signature files

Motivation and Context

Based on https://github.com/SeleniumHQ/selenium/issues/10943 I created the following PRs to add RBS-type support to the ruby selenium library:

On https://github.com/SeleniumHQ/selenium/pull/12844 I started adding support for RBS and I added the steep file configuration

On https://github.com/SeleniumHQ/selenium/pull/13192 I extended the classes supported on RBS and updated the logger file

On https://github.com/SeleniumHQ/selenium/pull/13234 I added RBS files for the entire selenium library, however several of the autogenerated files only have the type defined as untyped instead of the precise type

Example

Before:

  def atom_script: (untyped) -> untyped

  private

  def read_atom: (Symbol function) -> String

  def execute_atom: (Symbol function_name, *untyped arguments) -> untyped

After:

  def atom_script: (Symbol) -> String

  private

  def read_atom: (Symbol function) -> String

  def execute_atom: (Symbol function_name, [Element | String | Symbol] arguments) -> [Element | Integer | Float | bool | nil | String | Array[untyped]]

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] I have read the contributing document.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.

aguspe avatar Mar 19 '24 19:03 aguspe