Enable strict typing in Tap
This commit is contained in:
parent
9f05f0e625
commit
40c58a883d
@ -207,7 +207,7 @@ module Homebrew
|
||||
|
||||
if pull_request
|
||||
# This is a tap pull request and approving reviewers should also sign-off.
|
||||
tap = Tap.from_path(git_repo.pathname)
|
||||
tap = T.must(Tap.from_path(git_repo.pathname))
|
||||
review_trailers = GitHub.approved_reviews(tap.user, tap.full_name.split("/").last,
|
||||
pull_request).map do |r|
|
||||
"Signed-off-by: #{r["name"]} <#{r["email"]}>"
|
||||
@ -253,7 +253,7 @@ module Homebrew
|
||||
}
|
||||
def determine_bump_subject(old_contents, new_contents, subject_path, reason: nil)
|
||||
subject_path = Pathname(subject_path)
|
||||
tap = Tap.from_path(subject_path)
|
||||
tap = T.must(Tap.from_path(subject_path))
|
||||
subject_name = subject_path.basename.to_s.chomp(".rb")
|
||||
is_cask = subject_path.to_s.start_with?("#{tap.cask_dir}/")
|
||||
name = is_cask ? "cask" : "formula"
|
||||
|
@ -41,8 +41,8 @@ module Homebrew
|
||||
|
||||
titleized_user = tap.user.dup
|
||||
titleized_repository = tap.repository.dup
|
||||
titleized_user[0] = titleized_user[0].upcase
|
||||
titleized_repository[0] = titleized_repository[0].upcase
|
||||
titleized_user[0] = T.must(titleized_user[0]).upcase
|
||||
titleized_repository[0] = T.must(titleized_repository[0]).upcase
|
||||
# Duplicate assignment to silence `assigned but unused variable` warning
|
||||
root_url = root_url = GitHubPackages.root_url(tap.user, "homebrew-#{tap.repository}") if args.github_packages?
|
||||
|
||||
|
@ -548,7 +548,7 @@ module Homebrew
|
||||
core_cask_tap = CoreCaskTap.instance
|
||||
return unless core_cask_tap.installed?
|
||||
|
||||
broken_tap(core_cask_tap) || examine_git_origin(core_cask_tap.git_repository, core_cask_tap.remote)
|
||||
broken_tap(core_cask_tap) || examine_git_origin(core_cask_tap.git_repository, T.must(core_cask_tap.remote))
|
||||
end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user