Skip to content

Commit 2b56689

Browse files
committed
chore: Disable Style/MultipleComparison in aws_sdk
Aws::Client may not be defined in some scenarios. In those scenarios, Seahorse::Client::Base will be present, so the latter half of the condition will not be executed
1 parent 1b7ad8a commit 2b56689

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def loaded_service?(constant, service_module)
119119
!::Aws.autoload?(constant) &&
120120
service_module.is_a?(Module) &&
121121
service_module.const_defined?(:Client) &&
122-
[Seahorse::Client::Base, Aws::Client].include?(service_module.const_get(:Client).superclass)
122+
(service_module.const_get(:Client).superclass == Seahorse::Client::Base ||
123+
service_module.const_get(:Client).superclass == Aws::Client) # rubocop:disable Style/MultipleComparison
123124
end
124125
end
125126
end

0 commit comments

Comments
 (0)