Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Passed nil into T.must" error #10159

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading