Skip to content

Commit 4012263

Browse files
committed
Fix linter issues
1 parent 97f1e59 commit 4012263

File tree

17 files changed

+5
-32
lines changed

17 files changed

+5
-32
lines changed

rb/lib/selenium/server.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ def stop
215215
@log_file&.close
216216
end
217217

218-
# @rbs () -> String
219218
def webdriver_url
220219
"http://#{@host}:#{@port}/wd/hub"
221220
end

rb/lib/selenium/webdriver/bidi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def session
5656
end
5757

5858
def send_cmd(method, **params)
59-
data = { method: method, params: params.compact }
59+
data = {method: method, params: params.compact}
6060
message = @ws.send_cmd(**data)
6161
raise Error::WebDriverError, error_message(message) if message['error']
6262

rb/lib/selenium/webdriver/bidi/browsing_context.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def traverse_history(delta, context_id: nil)
6767
# Defaults to false.
6868
def reload(context_id: nil, ignore_cache: false)
6969
context_id ||= @bridge.window_handle
70-
params = { context: context_id, ignore_cache: ignore_cache, wait: @readiness }
70+
params = {context: context_id, ignore_cache: ignore_cache, wait: @readiness}
7171
@bidi.send_cmd('browsingContext.reload', **params)
7272
end
7373

@@ -97,7 +97,7 @@ def create(type: nil, context_id: nil)
9797

9898
def set_viewport(context_id: nil, width: nil, height: nil, device_pixel_ratio: nil)
9999
context_id ||= @bridge.window_handle
100-
params = { context: context_id, viewport: { width:, height: }, device_pixel_ratio: }
100+
params = {context: context_id, viewport: {width:, height:}, device_pixel_ratio:}
101101
@bidi.send_cmd('browsingContext.setViewport', **params)
102102
end
103103

rb/lib/selenium/webdriver/bidi/log_handler.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def add_message_handler(type)
4040
end
4141
end
4242
end
43-
4443
# steep:ignore:end
4544

4645
# @param [int] id of the handler previously added

rb/lib/selenium/webdriver/bidi/network/intercepted_auth.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,14 @@ module Selenium
2121
module WebDriver
2222
class BiDi
2323
class InterceptedAuth < InterceptedItem
24-
# @rbs (String, String) -> Hash[untyped, untyped]
2524
def authenticate(username, password)
2625
network.continue_with_auth(id, username, password)
2726
end
2827

29-
# @rbs () -> Hash[untyped, untyped]
3028
def skip
3129
network.continue_without_auth(id)
3230
end
3331

34-
# @rbs () -> Hash[untyped, untyped]
3532
def cancel
3633
network.cancel_auth(id)
3734
end

rb/lib/selenium/webdriver/bidi/network/intercepted_request.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@ class InterceptedRequest < InterceptedItem
2727
attr_accessor :method, :url
2828
attr_reader :body
2929

30-
# @rbs (Selenium::WebDriver::BiDi::Network, Hash[untyped, untyped]) -> void
3130
def initialize(network, request)
3231
super
3332
@method = nil
3433
@url = nil
3534
@body = nil
3635
end
3736

38-
# @rbs () -> Hash[untyped, untyped]?
3937
def continue
4038
network.continue_request(
4139
id: id,
@@ -47,25 +45,21 @@ def continue
4745
)
4846
end
4947

50-
# @rbs () -> Hash[untyped, untyped]?
5148
def fail
5249
network.fail_request(id)
5350
end
5451

55-
# @rbs (Hash[untyped, untyped]) -> void
5652
def body=(value)
5753
@body = {
5854
type: 'string',
5955
value: value.to_json
6056
}
6157
end
6258

63-
# @rbs () -> Selenium::WebDriver::BiDi::Headers
6459
def headers
6560
@headers ||= Headers.new
6661
end
6762

68-
# @rbs (?Hash[untyped, untyped]) -> Selenium::WebDriver::BiDi::Cookies
6963
def cookies(cookies = {})
7064
@cookies ||= Cookies.new(cookies)
7165
end

rb/lib/selenium/webdriver/bidi/network/intercepted_response.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@ class InterceptedResponse < InterceptedItem
2828
attr_accessor :reason, :status
2929
attr_reader :body
3030

31-
# @rbs (Selenium::WebDriver::BiDi::Network, Hash[untyped, untyped]) -> void
3231
def initialize(network, request)
3332
super
3433
@reason = nil
3534
@status = nil
3635
@body = nil
3736
end
3837

39-
# @rbs () -> Hash[untyped, untyped]?
4038
def continue
4139
network.continue_response(
4240
id: id,
@@ -48,7 +46,6 @@ def continue
4846
)
4947
end
5048

51-
# @rbs () -> Hash[untyped, untyped]
5249
def provide_response
5350
network.provide_response(
5451
id: id,
@@ -60,22 +57,18 @@ def provide_response
6057
)
6158
end
6259

63-
# @rbs (?username: nil, ?password: nil) -> Selenium::WebDriver::BiDi::Credentials
6460
def credentials(username: nil, password: nil)
6561
@credentials ||= Credentials.new(username: username, password: password)
6662
end
6763

68-
# @rbs () -> Selenium::WebDriver::BiDi::Headers
6964
def headers
7065
@headers ||= Headers.new
7166
end
7267

73-
# @rbs (?Hash[untyped, untyped]) -> Selenium::WebDriver::BiDi::Cookies
7468
def cookies(cookies = {})
7569
@cookies ||= Cookies.new(cookies)
7670
end
7771

78-
# @rbs (String) -> void
7972
def body=(value)
8073
@body = {
8174
type: 'string',

rb/lib/selenium/webdriver/common/child_process.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def alive?
7474
@pid && !exited?
7575
end
7676

77-
# @rbs () -> bool
7877
def exited?
7978
return false unless @pid
8079

rb/lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def network_conditions
4242
# @option conditions [Boolean] :offline
4343
#
4444

45-
# @rbs (Hash[untyped, untyped]) -> void
4645
def network_conditions=(conditions)
4746
conditions[:latency] ||= 0
4847
unless conditions.key?(:throughput)
@@ -58,7 +57,6 @@ def network_conditions=(conditions)
5857
# Resets Chromium network emulation settings.
5958
#
6059

61-
# @rbs () -> void
6260
def delete_network_conditions
6361
@bridge.delete_network_conditions
6462
end

rb/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ module HasNetworkInterception
5959
# @yieldparam [Proc] continue block which proceeds with the request and optionally yields response
6060
#
6161

62-
# @rbs () -> void
6362
def intercept(&block)
6463
if browser == :firefox
6564
WebDriver.logger.deprecate(

0 commit comments

Comments
 (0)