diff --git a/Library/Homebrew/unpack_strategy/air.rb b/Library/Homebrew/unpack_strategy/air.rb index 1aeaa830da..6415995419 100644 --- a/Library/Homebrew/unpack_strategy/air.rb +++ b/Library/Homebrew/unpack_strategy/air.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,13 +11,15 @@ module UnpackStrategy [".air"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) mime_type = "application/vnd.adobe.air-application-installer-package+zip" path.magic_number.match?(/.{59}#{Regexp.escape(mime_type)}/) end + sig { returns(T.nilable(T::Array[Cask::Cask])) } def dependencies - @dependencies ||= [Cask::CaskLoader.load("adobe-air")] + @dependencies ||= T.let([Cask::CaskLoader.load("adobe-air")], T.nilable(T::Array[Cask::Cask])) end AIR_APPLICATION_INSTALLER = diff --git a/Library/Homebrew/unpack_strategy/bazaar.rb b/Library/Homebrew/unpack_strategy/bazaar.rb index b952ba206d..770cca92aa 100644 --- a/Library/Homebrew/unpack_strategy/bazaar.rb +++ b/Library/Homebrew/unpack_strategy/bazaar.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "directory" @@ -6,8 +6,9 @@ require_relative "directory" module UnpackStrategy # Strategy for unpacking Bazaar archives. class Bazaar < Directory + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) - super && (path/".bzr").directory? + !!(super && (path/".bzr").directory?) end private diff --git a/Library/Homebrew/unpack_strategy/bzip2.rb b/Library/Homebrew/unpack_strategy/bzip2.rb index 6225b93388..12190c6a69 100644 --- a/Library/Homebrew/unpack_strategy/bzip2.rb +++ b/Library/Homebrew/unpack_strategy/bzip2.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,6 +11,7 @@ module UnpackStrategy [".bz2"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\ABZh/n) end diff --git a/Library/Homebrew/unpack_strategy/cab.rb b/Library/Homebrew/unpack_strategy/cab.rb index 388ceb425c..a4cc7993a6 100644 --- a/Library/Homebrew/unpack_strategy/cab.rb +++ b/Library/Homebrew/unpack_strategy/cab.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,6 +11,7 @@ module UnpackStrategy [".cab"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\AMSCF/n) end @@ -23,8 +24,9 @@ module UnpackStrategy verbose: end + sig { returns(T.nilable(T::Array[Formula])) } def dependencies - @dependencies ||= [Formula["cabextract"]] + @dependencies ||= T.let([Formula["cabextract"]], T.nilable(T::Array[Formula])) end end end diff --git a/Library/Homebrew/unpack_strategy/compress.rb b/Library/Homebrew/unpack_strategy/compress.rb index e2d6ce37f8..504f31390b 100644 --- a/Library/Homebrew/unpack_strategy/compress.rb +++ b/Library/Homebrew/unpack_strategy/compress.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "tar" @@ -11,6 +11,7 @@ module UnpackStrategy [".Z"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\A\037\235/n) end diff --git a/Library/Homebrew/unpack_strategy/cvs.rb b/Library/Homebrew/unpack_strategy/cvs.rb index af6f0a3a77..7e3c5b018b 100644 --- a/Library/Homebrew/unpack_strategy/cvs.rb +++ b/Library/Homebrew/unpack_strategy/cvs.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "directory" @@ -6,8 +6,9 @@ require_relative "directory" module UnpackStrategy # Strategy for unpacking CVS repositories. class Cvs < Directory + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) - super && (path/"CVS").directory? + !!(super && (path/"CVS").directory?) end end end diff --git a/Library/Homebrew/unpack_strategy/directory.rb b/Library/Homebrew/unpack_strategy/directory.rb index 50127031da..62c76284bd 100644 --- a/Library/Homebrew/unpack_strategy/directory.rb +++ b/Library/Homebrew/unpack_strategy/directory.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,6 +11,7 @@ module UnpackStrategy [] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.directory? end diff --git a/Library/Homebrew/unpack_strategy/executable.rb b/Library/Homebrew/unpack_strategy/executable.rb index 86c381ef13..51cf812786 100644 --- a/Library/Homebrew/unpack_strategy/executable.rb +++ b/Library/Homebrew/unpack_strategy/executable.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "uncompressed" @@ -11,6 +11,7 @@ module UnpackStrategy [".sh", ".bash"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\A#!\s*\S+/n) || path.magic_number.match?(/\AMZ/n) diff --git a/Library/Homebrew/unpack_strategy/fossil.rb b/Library/Homebrew/unpack_strategy/fossil.rb index 8517d064f2..8914c05aa8 100644 --- a/Library/Homebrew/unpack_strategy/fossil.rb +++ b/Library/Homebrew/unpack_strategy/fossil.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require "system_command" @@ -14,6 +14,7 @@ module UnpackStrategy [] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) return false unless path.magic_number.match?(/\ASQLite format 3\000/n) diff --git a/Library/Homebrew/unpack_strategy/generic_unar.rb b/Library/Homebrew/unpack_strategy/generic_unar.rb index 1e3075e947..ecc6e2c256 100644 --- a/Library/Homebrew/unpack_strategy/generic_unar.rb +++ b/Library/Homebrew/unpack_strategy/generic_unar.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,12 +11,14 @@ module UnpackStrategy [] end + sig { override.params(_path: Pathname).returns(T::Boolean) } def self.can_extract?(_path) false end + sig { returns(T.nilable(T::Array[Formula])) } def dependencies - @dependencies ||= [Formula["unar"]] + @dependencies ||= T.let([Formula["unar"]], T.nilable(T::Array[Formula])) end private diff --git a/Library/Homebrew/unpack_strategy/git.rb b/Library/Homebrew/unpack_strategy/git.rb index ab39f3c4e0..42b906f125 100644 --- a/Library/Homebrew/unpack_strategy/git.rb +++ b/Library/Homebrew/unpack_strategy/git.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "directory" @@ -6,8 +6,9 @@ require_relative "directory" module UnpackStrategy # Strategy for unpacking Git repositories. class Git < Directory + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) - super && (path/".git").directory? + !!(super && (path/".git").directory?) end end end diff --git a/Library/Homebrew/unpack_strategy/gzip.rb b/Library/Homebrew/unpack_strategy/gzip.rb index 70ff74c56e..b525cc6d0b 100644 --- a/Library/Homebrew/unpack_strategy/gzip.rb +++ b/Library/Homebrew/unpack_strategy/gzip.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,6 +11,7 @@ module UnpackStrategy [".gz"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\A\037\213/n) end diff --git a/Library/Homebrew/unpack_strategy/jar.rb b/Library/Homebrew/unpack_strategy/jar.rb index 8082d8602c..0be166bbaa 100644 --- a/Library/Homebrew/unpack_strategy/jar.rb +++ b/Library/Homebrew/unpack_strategy/jar.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "uncompressed" @@ -11,6 +11,7 @@ module UnpackStrategy [".apk", ".jar"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) return false unless Zip.can_extract?(path) diff --git a/Library/Homebrew/unpack_strategy/lha.rb b/Library/Homebrew/unpack_strategy/lha.rb index ece0b4b8cc..0fdb49ed55 100644 --- a/Library/Homebrew/unpack_strategy/lha.rb +++ b/Library/Homebrew/unpack_strategy/lha.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,12 +11,14 @@ module UnpackStrategy [".lha", ".lzh"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\A..-(lh0|lh1|lz4|lz5|lzs|lh\\40|lhd|lh2|lh3|lh4|lh5)-/n) end + sig { returns(T.nilable(T::Array[Formula])) } def dependencies - @dependencies ||= [Formula["lha"]] + @dependencies ||= T.let([Formula["lha"]], T.nilable(T::Array[Formula])) end private diff --git a/Library/Homebrew/unpack_strategy/lua_rock.rb b/Library/Homebrew/unpack_strategy/lua_rock.rb index b054b9f810..f806364a0f 100644 --- a/Library/Homebrew/unpack_strategy/lua_rock.rb +++ b/Library/Homebrew/unpack_strategy/lua_rock.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "uncompressed" @@ -11,6 +11,7 @@ module UnpackStrategy [".rock"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) return false unless Zip.can_extract?(path) diff --git a/Library/Homebrew/unpack_strategy/lzip.rb b/Library/Homebrew/unpack_strategy/lzip.rb index 90150a40c6..710f3684db 100644 --- a/Library/Homebrew/unpack_strategy/lzip.rb +++ b/Library/Homebrew/unpack_strategy/lzip.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,12 +11,14 @@ module UnpackStrategy [".lz"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\ALZIP/n) end + sig { returns(T.nilable(T::Array[Formula])) } def dependencies - @dependencies ||= [Formula["lzip"]] + @dependencies ||= T.let([Formula["lzip"]], T.nilable(T::Array[Formula])) end private diff --git a/Library/Homebrew/unpack_strategy/lzma.rb b/Library/Homebrew/unpack_strategy/lzma.rb index 5b6ed1c4e8..d1b6710c42 100644 --- a/Library/Homebrew/unpack_strategy/lzma.rb +++ b/Library/Homebrew/unpack_strategy/lzma.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,12 +11,14 @@ module UnpackStrategy [".lzma"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\A\]\000\000\200\000/n) end + sig { returns(T.nilable(T::Array[Formula])) } def dependencies - @dependencies ||= [Formula["xz"]] + @dependencies ||= T.let([Formula["xz"]], T.nilable(T::Array[Formula])) end private diff --git a/Library/Homebrew/unpack_strategy/mercurial.rb b/Library/Homebrew/unpack_strategy/mercurial.rb index c4a77d4d0d..146f686c9c 100644 --- a/Library/Homebrew/unpack_strategy/mercurial.rb +++ b/Library/Homebrew/unpack_strategy/mercurial.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "directory" @@ -6,12 +6,14 @@ require_relative "directory" module UnpackStrategy # Strategy for unpacking Mercurial repositories. class Mercurial < Directory + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) - super && (path/".hg").directory? + !!(super && (path/".hg").directory?) end private + sig { override.params(unpack_dir: Pathname, basename: Pathname, verbose: T::Boolean).void } def extract_to_dir(unpack_dir, basename:, verbose:) system_command! "hg", args: ["--cwd", path, "archive", "--subrepos", "-y", "-t", "files", unpack_dir], diff --git a/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb b/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb index dfc4c084f4..cb54b9b1f7 100644 --- a/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb +++ b/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "uncompressed" @@ -15,6 +15,7 @@ module UnpackStrategy ] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) return false unless Zip.can_extract?(path) diff --git a/Library/Homebrew/unpack_strategy/otf.rb b/Library/Homebrew/unpack_strategy/otf.rb index b4839b2a61..da593812a5 100644 --- a/Library/Homebrew/unpack_strategy/otf.rb +++ b/Library/Homebrew/unpack_strategy/otf.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "uncompressed" @@ -11,6 +11,7 @@ module UnpackStrategy [".otf"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\AOTTO/n) end diff --git a/Library/Homebrew/unpack_strategy/p7zip.rb b/Library/Homebrew/unpack_strategy/p7zip.rb index 69e2c9deab..44a8c4b986 100644 --- a/Library/Homebrew/unpack_strategy/p7zip.rb +++ b/Library/Homebrew/unpack_strategy/p7zip.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,12 +11,14 @@ module UnpackStrategy [".7z"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\A7z\xBC\xAF\x27\x1C/n) end + sig { returns(T.nilable(T::Array[Formula])) } def dependencies - @dependencies ||= [Formula["p7zip"]] + @dependencies ||= T.let([Formula["p7zip"]], T.nilable(T::Array[Formula])) end private diff --git a/Library/Homebrew/unpack_strategy/pax.rb b/Library/Homebrew/unpack_strategy/pax.rb index bc5f89c15a..9cbc799c23 100644 --- a/Library/Homebrew/unpack_strategy/pax.rb +++ b/Library/Homebrew/unpack_strategy/pax.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,6 +11,7 @@ module UnpackStrategy [".pax"] end + sig { override.params(_path: Pathname).returns(T::Boolean) } def self.can_extract?(_path) false end diff --git a/Library/Homebrew/unpack_strategy/pkg.rb b/Library/Homebrew/unpack_strategy/pkg.rb index e4b288b827..585edfbea9 100644 --- a/Library/Homebrew/unpack_strategy/pkg.rb +++ b/Library/Homebrew/unpack_strategy/pkg.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "uncompressed" @@ -11,6 +11,7 @@ module UnpackStrategy [".pkg", ".mkpg"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.extname.match?(/\A.m?pkg\Z/) && (path.directory? || path.magic_number.match?(/\Axar!/n)) diff --git a/Library/Homebrew/unpack_strategy/rar.rb b/Library/Homebrew/unpack_strategy/rar.rb index 06394dbdf4..7d8109d654 100644 --- a/Library/Homebrew/unpack_strategy/rar.rb +++ b/Library/Homebrew/unpack_strategy/rar.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,12 +11,14 @@ module UnpackStrategy [".rar"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\ARar!/n) end + sig { returns(T.nilable(T::Array[Formula])) } def dependencies - @dependencies ||= [Formula["libarchive"]] + @dependencies ||= T.let([Formula["libarchive"]], T.nilable(T::Array[Formula])) end private diff --git a/Library/Homebrew/unpack_strategy/self_extracting_executable.rb b/Library/Homebrew/unpack_strategy/self_extracting_executable.rb index 078ce77365..58bad3be74 100644 --- a/Library/Homebrew/unpack_strategy/self_extracting_executable.rb +++ b/Library/Homebrew/unpack_strategy/self_extracting_executable.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "generic_unar" @@ -11,6 +11,7 @@ module UnpackStrategy [] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\AMZ/n) && path.file_type.include?("self-extracting archive") diff --git a/Library/Homebrew/unpack_strategy/sit.rb b/Library/Homebrew/unpack_strategy/sit.rb index 631c446297..82c48e6d19 100644 --- a/Library/Homebrew/unpack_strategy/sit.rb +++ b/Library/Homebrew/unpack_strategy/sit.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "generic_unar" @@ -11,6 +11,7 @@ module UnpackStrategy [".sit"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\AStuffIt/n) end diff --git a/Library/Homebrew/unpack_strategy/subversion.rb b/Library/Homebrew/unpack_strategy/subversion.rb index 7ba74fa5e0..81c037d73e 100644 --- a/Library/Homebrew/unpack_strategy/subversion.rb +++ b/Library/Homebrew/unpack_strategy/subversion.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "directory" @@ -6,12 +6,14 @@ require_relative "directory" module UnpackStrategy # Strategy for unpacking Subversion repositories. class Subversion < Directory + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) - super && (path/".svn").directory? + !!(super && (path/".svn").directory?) end private + sig { override.params(unpack_dir: Pathname, basename: Pathname, verbose: T::Boolean).void } def extract_to_dir(unpack_dir, basename:, verbose:) system_command! "svn", args: ["export", "--force", ".", unpack_dir], diff --git a/Library/Homebrew/unpack_strategy/tar.rb b/Library/Homebrew/unpack_strategy/tar.rb index adbf59def5..ae3ff08cd2 100644 --- a/Library/Homebrew/unpack_strategy/tar.rb +++ b/Library/Homebrew/unpack_strategy/tar.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require "system_command" @@ -22,6 +22,7 @@ module UnpackStrategy ] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) return true if path.magic_number.match?(/\A.{257}ustar/n) diff --git a/Library/Homebrew/unpack_strategy/ttf.rb b/Library/Homebrew/unpack_strategy/ttf.rb index 3c73a6801e..c240f93679 100644 --- a/Library/Homebrew/unpack_strategy/ttf.rb +++ b/Library/Homebrew/unpack_strategy/ttf.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require_relative "uncompressed" @@ -11,6 +11,7 @@ module UnpackStrategy [".ttc", ".ttf"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) # TrueType Font path.magic_number.match?(/\A\000\001\000\000\000/n) || diff --git a/Library/Homebrew/unpack_strategy/xar.rb b/Library/Homebrew/unpack_strategy/xar.rb index 0d571fa5ac..d6562f8d22 100644 --- a/Library/Homebrew/unpack_strategy/xar.rb +++ b/Library/Homebrew/unpack_strategy/xar.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,6 +11,7 @@ module UnpackStrategy [".xar"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\Axar!/n) end diff --git a/Library/Homebrew/unpack_strategy/xz.rb b/Library/Homebrew/unpack_strategy/xz.rb index a9ffc96a65..2e155c687b 100644 --- a/Library/Homebrew/unpack_strategy/xz.rb +++ b/Library/Homebrew/unpack_strategy/xz.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,12 +11,14 @@ module UnpackStrategy [".xz"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\A\xFD7zXZ\x00/n) end + sig { returns(T.nilable(T::Array[Formula])) } def dependencies - @dependencies ||= [Formula["xz"]] + @dependencies ||= T.let([Formula["xz"]], T.nilable(T::Array[Formula])) end private diff --git a/Library/Homebrew/unpack_strategy/zip.rb b/Library/Homebrew/unpack_strategy/zip.rb index 59da683f35..28e413e00a 100644 --- a/Library/Homebrew/unpack_strategy/zip.rb +++ b/Library/Homebrew/unpack_strategy/zip.rb @@ -23,6 +23,7 @@ module UnpackStrategy .returns(SystemCommand::Result) } def extract_to_dir(unpack_dir, basename:, verbose:) + odebug "in unpack_strategy, zip, extract_to_dir, verbose: #{verbose.inspect}" unzip = if which("unzip").blank? begin Formula["unzip"] diff --git a/Library/Homebrew/unpack_strategy/zstd.rb b/Library/Homebrew/unpack_strategy/zstd.rb index 3dfa808f34..475b0ca518 100644 --- a/Library/Homebrew/unpack_strategy/zstd.rb +++ b/Library/Homebrew/unpack_strategy/zstd.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module UnpackStrategy @@ -11,12 +11,14 @@ module UnpackStrategy [".zst"] end + sig { override.params(path: Pathname).returns(T::Boolean) } def self.can_extract?(path) path.magic_number.match?(/\x28\xB5\x2F\xFD/n) end + sig { returns(T.nilable(T::Array[Formula])) } def dependencies - @dependencies ||= [Formula["zstd"]] + @dependencies ||= T.let([Formula["zstd"]], T.nilable(T::Array[Formula])) end private