You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some key observations to aid the review process:
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review
Method Signature Change The remove_callback method signature has been changed to accept parameters. Ensure this change is consistent with the implementation and doesn't break existing code.
Return Type Changes The return types for remove_message_handler, subscribe_log_entry, and unsubscribe_log_entry have been changed from false to bool. Verify if this change is intentional and consistent with the actual implementation.
New Methods Several new methods and instance variables have been added to the DriverFinder class. Ensure these additions are properly implemented and documented in the actual code.
Method Signature Changes The add_callback and remove_callback methods have been modified to accept parameters. Verify that these changes are reflected in the implementation and don't break existing functionality.
✅ Specify more precise types for method parameters to improve type safety and claritySuggestion Impact:The commit implemented more precise types for the parameters in the remove_callback method, changing 'event' to 'String' and 'id' to 'Integer', which aligns with the suggestion's goal of improving type safety.
Consider specifying more precise types for the event and id parameters in the remove_callback method signature. This will improve type safety and make the method's usage clearer.
Why: The suggestion to specify more precise types for the event and id parameters in the remove_callback method enhances type safety and clarity, which is beneficial for maintainability and reducing potential runtime errors.
7
Specify more precise types for method parameters to improve type information and clarity
Consider specifying more precise types for the options and service parameters in the initialize method. This will provide better type information and improve code clarity.
Why: Providing more precise types for the options and service parameters in the initialize method improves type information and code clarity, which can help prevent type-related errors and make the code easier to understand.
7
Specify a more precise type for a class attribute to improve type information and clarity
Consider specifying a more precise type for extra_finders instead of using untyped. This will provide better type information and improve code clarity.
Why: Using a more precise type for extra_finders instead of untyped enhances type information and clarity, which aids in understanding the code and catching type-related issues early.
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
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.
Description
This PR adds an array of RBS missing methods and reduces the RBS errors from 73 to 28
Motivation and Context
To add full RBS support for Selenium and allow us to eventually add an RBS check on the pipeline.
The reference feature is #10943
The goal is also to be able to have no steep errors to start adding the right type on the classes that have untyped to have the right type enforces
Types of changes
Checklist
PR Type
enhancement
Description
Changes walkthrough 📝
11 files
bidi.rbs
Update `remove_callback` method signature in BiDi modulerb/sig/lib/selenium/webdriver/bidi.rbs
remove_callbackmethod signature to accept parameters.log_handler.rbs
Update return types in LogHandler modulerb/sig/lib/selenium/webdriver/bidi/log_handler.rbs
remove_message_handlertobool.subscribe_log_entrytobool.unsubscribe_log_entrytobool.driver_finder.rbs
Add initialization and path methods to DriverFinderrb/sig/lib/selenium/webdriver/common/driver_finder.rbs
@options,@paths, and@service.initializemethod with parameters.browser_path,browser_path?, anddriver_path.search_context.rbs
Add accessors and methods to SearchContext modulerb/sig/lib/selenium/webdriver/common/search_context.rbs
attr_accessorforself.extra_finders.self.findersmethod.service.rbs
Update Service module with new method and type changerb/sig/lib/selenium/webdriver/common/service.rbs
env_pathtoString?.find_driver_pathmethod.websocket_connection.rbs
Add and update callback methods in WebSocketConnectionrb/sig/lib/selenium/webdriver/common/websocket_connection.rbs
add_callbackmethod with parameters.remove_callbackmethod signature to accept parameters.dialog.rbs
Add initialization method to FedCM Dialog classrb/sig/lib/selenium/webdriver/fedcm/dialog.rbs
initializemethod withRemote::Bridgeparameter.options.rbs
Add options instance variable to Firefox Optionsrb/sig/lib/selenium/webdriver/firefox/options.rbs
@options.common.rbs
Enhance HTTP Common with headers and user agent methodsrb/sig/lib/selenium/webdriver/remote/http/common.rbs
@common_headersinstance variable.attr_accessorforself.extra_headers.attr_writerand method forself.user_agent.common_headersmethod.guard.rbs
Add tracker attribute reader to Guard classrb/sig/lib/selenium/webdriver/support/guards/guard.rbs
attr_readerfortracker.script.rbs
Add initialization and update handler method in Script classrb/sig/selenium/web_driver/script.rbs
initializemethod withBiDiparameter.remove_console_message_handlerto accept anidparameter.