Skip to content

Commit

Permalink
Strict type Dependabot::Bundler::PathGemspecFinder.
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-meka committed Jun 19, 2024
1 parent 21d5dc7 commit 711d436
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def path_gemspec_paths
sig { returns(T.nilable(Dependabot::DependencyFile)) }
attr_reader :gemfile

sig { params(node: T.untyped).returns(T::Array[String]) }
sig { params(node: T.untyped).returns(T::Array[T.untyped]) }
def find_path_gemspec_paths(node)
return [] unless node.is_a?(Parser::AST::Node)

Expand All @@ -49,7 +49,7 @@ def find_path_gemspec_paths(node)
end

path = T.must(path_node).loc.expression.source.gsub(/['"]/, "")
return [clean_path(path).to_s] # Convert Pathname to string
return [clean_path(path)]
end

node.children.flat_map do |child_node|
Expand Down

0 comments on commit 711d436

Please sign in to comment.