From df2fcfdfb05a8b568fd8c4f7d869689700ca6709 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Thu, 15 Aug 2024 08:18:31 -0700 Subject: [PATCH] Add missing sigs --- Library/Homebrew/extend/os/linux/cleanup.rb | 1 + Library/Homebrew/extend/os/mac/cleanup.rb | 3 ++- Library/Homebrew/extend/os/mac/linkage_checker.rb | 1 + Library/Homebrew/sorbet/tapioca/compilers/args.rb | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/extend/os/linux/cleanup.rb b/Library/Homebrew/extend/os/linux/cleanup.rb index a9443a3d5902f..b6cd428fe88d6 100644 --- a/Library/Homebrew/extend/os/linux/cleanup.rb +++ b/Library/Homebrew/extend/os/linux/cleanup.rb @@ -5,6 +5,7 @@ module Homebrew class Cleanup undef use_system_ruby? + sig { returns(T::Boolean) } def use_system_ruby? return false if Homebrew::EnvConfig.force_vendor_ruby? diff --git a/Library/Homebrew/extend/os/mac/cleanup.rb b/Library/Homebrew/extend/os/mac/cleanup.rb index 6ede0bcd7ada8..3565e162b4f4b 100644 --- a/Library/Homebrew/extend/os/mac/cleanup.rb +++ b/Library/Homebrew/extend/os/mac/cleanup.rb @@ -1,10 +1,11 @@ -# typed: true # rubocop:disable Sorbet/StrictSigil +# typed: strict # frozen_string_literal: true module Homebrew class Cleanup undef use_system_ruby? + sig { returns(T::Boolean) } def use_system_ruby? return false if Homebrew::EnvConfig.force_vendor_ruby? diff --git a/Library/Homebrew/extend/os/mac/linkage_checker.rb b/Library/Homebrew/extend/os/mac/linkage_checker.rb index 6c69fd291b580..b48d2b90d325a 100644 --- a/Library/Homebrew/extend/os/mac/linkage_checker.rb +++ b/Library/Homebrew/extend/os/mac/linkage_checker.rb @@ -6,6 +6,7 @@ class LinkageChecker private + sig { returns(T::Boolean) } def system_libraries_exist_in_cache? # In macOS Big Sur and later, system libraries do not exist on-disk and instead exist in a cache. MacOS.version >= :big_sur diff --git a/Library/Homebrew/sorbet/tapioca/compilers/args.rb b/Library/Homebrew/sorbet/tapioca/compilers/args.rb index 947527d5a59eb..b59ecaff3d1d4 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/args.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/args.rb @@ -32,7 +32,7 @@ def self.gather_constants def decorate cmd = T.cast(constant, T.class_of(Homebrew::AbstractCommand)) # This is a dummy class to make the `brew` command parsable - return if cmd.name == "Homebrew::Cmd::Brew" + return if cmd == Homebrew::Cmd::Brew args_class_name = T.must(T.must(cmd.args_class).name) root.create_class(args_class_name, superclass_name: "Homebrew::CLI::Args") do |klass|