Skip to content

Commit

Permalink
chore: Disable Style/MultipleComparison in aws_sdk
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kaylareopelle committed Jan 16, 2025
1 parent 1b7ad8a commit 2b56689
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def loaded_service?(constant, service_module)
!::Aws.autoload?(constant) &&
service_module.is_a?(Module) &&
service_module.const_defined?(:Client) &&
[Seahorse::Client::Base, Aws::Client].include?(service_module.const_get(:Client).superclass)
(service_module.const_get(:Client).superclass == Seahorse::Client::Base ||
service_module.const_get(:Client).superclass == Aws::Client) # rubocop:disable Style/MultipleComparison
end
end
end
Expand Down

0 comments on commit 2b56689

Please sign in to comment.