Skip to content

Commit

Permalink
To fix test cases issue, changed return type.
Browse files Browse the repository at this point in the history
  • Loading branch information
randhircs committed Feb 26, 2025
1 parent fea34b7 commit 45c55b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/lib/dependabot/python/metadata_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MetadataFinder < Dependabot::MetadataFinders::Base
extend T::Sig
MAIN_PYPI_URL = "https://pypi.org/pypi"

sig { returns(T.nilable(String)) }
sig { returns(T.untyped) }
def homepage_url
pypi_listing.dig("info", "home_page") ||
pypi_listing.dig("info", "project_urls", "Homepage") ||
Expand Down Expand Up @@ -88,7 +88,7 @@ def source_from_homepage
return unless homepage_body

potential_source_urls = []
homepage_body.scan(Source::SOURCE_REGEX) do
T.must(homepage_body).scan(Source::SOURCE_REGEX) do
potential_source_urls << Regexp.last_match.to_s
end

Expand All @@ -113,7 +113,7 @@ def source_from_homepage
end
# rubocop:enable Metrics/PerceivedComplexity

sig { returns(T.untyped) }
sig { returns(T.nilable(Excon::Response)) }
def homepage_body
homepage_url = pypi_listing.dig("info", "home_page")

Expand Down Expand Up @@ -176,7 +176,7 @@ def fetch_authed_url(url)
end
end

sig { returns(T::Array[String]) }
sig { returns(T.untyped) }
def possible_listing_urls
credential_urls =
credentials
Expand Down

0 comments on commit 45c55b0

Please sign in to comment.