Skip to content

Commit

Permalink
Fix "Passed nil into T.must" error (#10159)
Browse files Browse the repository at this point in the history
Co-authored-by: AbdulFattaah Popoola <abdulapopoola@github.com>
  • Loading branch information
JamieMagee and abdulapopoola authored Jul 8, 2024
1 parent 7b36bba commit 1bf7258
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go_modules/lib/dependabot/go_modules/update_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def lowest_resolvable_security_fix_version
lowest_security_fix_version
end

sig { override.returns(Dependabot::Version) }
sig { override.returns(T.nilable(Dependabot::Version)) }
def lowest_security_fix_version
latest_version_finder.lowest_security_fix_version
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def latest_version
@latest_version ||= T.let(fetch_latest_version, T.nilable(Dependabot::Version))
end

sig { returns(Dependabot::Version) }
sig { returns(T.nilable(Dependabot::Version)) }
def lowest_security_fix_version
@lowest_security_fix_version ||= T.let(fetch_lowest_security_fix_version, T.nilable(Dependabot::Version))
end
Expand Down Expand Up @@ -105,7 +105,7 @@ def fetch_latest_version
candidate_versions.max
end

sig { returns(Dependabot::Version) }
sig { returns(T.nilable(Dependabot::Version)) }
def fetch_lowest_security_fix_version
relevant_versions = available_versions
relevant_versions = filter_prerelease_versions(relevant_versions)
Expand All @@ -114,7 +114,7 @@ def fetch_lowest_security_fix_version
relevant_versions = filter_ignored_versions(relevant_versions)
relevant_versions = filter_lower_versions(relevant_versions)

T.must(relevant_versions.min)
relevant_versions.min
end

sig { returns(T::Array[Dependabot::Version]) }
Expand Down

0 comments on commit 1bf7258

Please sign in to comment.