Skip to content

Commit

Permalink
Fix InternalAffairs/NodeTypeMultiplePredicates offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
bquorning committed Feb 17, 2025
1 parent 5c84c6d commit dac3947
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def requires_parentheses?(node)
end

def range_type?(node)
node.erange_type? || node.irange_type?
node.type?(:erange, :irange)
end

def correct_splat_expansion(corrector, expr, splat_value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def on_class(node)
def on_send(node)
argument = node.first_argument

return unless argument&.sym_type? || argument&.str_type?
return unless argument&.type?(:sym, :str)
return if allowed_identifier?(argument.value)

add_offense node
Expand Down

0 comments on commit dac3947

Please sign in to comment.