diff --git a/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb b/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb index edd4d0f041..cff64f5802 100644 --- a/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb +++ b/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb @@ -11,8 +11,6 @@ module UnpackStrategy include UnpackStrategy include SystemCommand::Mixin - - sig { override.params(unpack_dir: Pathname, basename: Pathname, verbose: T::Boolean).returns(T.untyped) } def extract_to_dir(unpack_dir, basename:, verbose:) with_env(TZ: "UTC") do diff --git a/Library/Homebrew/unpack_strategy.rb b/Library/Homebrew/unpack_strategy.rb index 20f3353d43..8a29604b93 100644 --- a/Library/Homebrew/unpack_strategy.rb +++ b/Library/Homebrew/unpack_strategy.rb @@ -159,9 +159,9 @@ module UnpackStrategy # Helper method for iterating over directory trees. sig { params( - pathname: Pathname, - _block: T.proc.params(path: Pathname).void, - ).returns(T.nilable(Pathname)) + pathname: Pathname, + _block: T.proc.params(path: Pathname).void, + ).returns(T.nilable(Pathname)) } def each_directory(pathname, &_block) pathname.find do |path| diff --git a/Library/Homebrew/unpack_strategy/bazaar.rb b/Library/Homebrew/unpack_strategy/bazaar.rb index 301b61b196..62eb0c4946 100644 --- a/Library/Homebrew/unpack_strategy/bazaar.rb +++ b/Library/Homebrew/unpack_strategy/bazaar.rb @@ -8,8 +8,6 @@ module UnpackStrategy class Bazaar < Directory extend T::Sig - - def self.can_extract?(path) super && (path/".bzr").directory? end diff --git a/Library/Homebrew/unpack_strategy/bzip2.rb b/Library/Homebrew/unpack_strategy/bzip2.rb index b030a9ccb9..82e9501b6a 100644 --- a/Library/Homebrew/unpack_strategy/bzip2.rb +++ b/Library/Homebrew/unpack_strategy/bzip2.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".bz2"] diff --git a/Library/Homebrew/unpack_strategy/cab.rb b/Library/Homebrew/unpack_strategy/cab.rb index 3ac8bb88e6..de2258af88 100644 --- a/Library/Homebrew/unpack_strategy/cab.rb +++ b/Library/Homebrew/unpack_strategy/cab.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".cab"] diff --git a/Library/Homebrew/unpack_strategy/compress.rb b/Library/Homebrew/unpack_strategy/compress.rb index c9cbac5a1c..0cc11abbd7 100644 --- a/Library/Homebrew/unpack_strategy/compress.rb +++ b/Library/Homebrew/unpack_strategy/compress.rb @@ -8,8 +8,6 @@ module UnpackStrategy class Compress < Tar extend T::Sig - - sig { returns(T::Array[String]) } def self.extensions [".Z"] diff --git a/Library/Homebrew/unpack_strategy/cvs.rb b/Library/Homebrew/unpack_strategy/cvs.rb index 5e61d86202..af6f0a3a77 100644 --- a/Library/Homebrew/unpack_strategy/cvs.rb +++ b/Library/Homebrew/unpack_strategy/cvs.rb @@ -6,8 +6,6 @@ require_relative "directory" module UnpackStrategy # Strategy for unpacking CVS repositories. class Cvs < Directory - - def self.can_extract?(path) super && (path/"CVS").directory? end diff --git a/Library/Homebrew/unpack_strategy/directory.rb b/Library/Homebrew/unpack_strategy/directory.rb index 4af36d9cbd..f20b9a566e 100644 --- a/Library/Homebrew/unpack_strategy/directory.rb +++ b/Library/Homebrew/unpack_strategy/directory.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [] diff --git a/Library/Homebrew/unpack_strategy/dmg.rb b/Library/Homebrew/unpack_strategy/dmg.rb index 6891ad1ad5..cb3ee47d12 100644 --- a/Library/Homebrew/unpack_strategy/dmg.rb +++ b/Library/Homebrew/unpack_strategy/dmg.rb @@ -99,10 +99,10 @@ module UnpackStrategy # For HFS, just use # For APFS, find the corresponding to eject_paths = disk_info.plist - .fetch("APFSPhysicalStores", []) - .map { |store| store["APFSPhysicalStore"] } - .compact - .presence || [path] + .fetch("APFSPhysicalStores", []) + .map { |store| store["APFSPhysicalStore"] } + .compact + .presence || [path] eject_paths.each do |eject_path| system_command! "diskutil", diff --git a/Library/Homebrew/unpack_strategy/executable.rb b/Library/Homebrew/unpack_strategy/executable.rb index 3a749bc845..6bf45599ed 100644 --- a/Library/Homebrew/unpack_strategy/executable.rb +++ b/Library/Homebrew/unpack_strategy/executable.rb @@ -8,8 +8,6 @@ module UnpackStrategy class Executable < Uncompressed extend T::Sig - - sig { returns(T::Array[String]) } def self.extensions [".sh", ".bash"] diff --git a/Library/Homebrew/unpack_strategy/fossil.rb b/Library/Homebrew/unpack_strategy/fossil.rb index b7abec13ae..a09218cf77 100644 --- a/Library/Homebrew/unpack_strategy/fossil.rb +++ b/Library/Homebrew/unpack_strategy/fossil.rb @@ -11,8 +11,6 @@ module UnpackStrategy include UnpackStrategy extend SystemCommand::Mixin - - sig { returns(T::Array[String]) } def self.extensions [] diff --git a/Library/Homebrew/unpack_strategy/generic_unar.rb b/Library/Homebrew/unpack_strategy/generic_unar.rb index af19520cb7..a860f8ec6b 100644 --- a/Library/Homebrew/unpack_strategy/generic_unar.rb +++ b/Library/Homebrew/unpack_strategy/generic_unar.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [] diff --git a/Library/Homebrew/unpack_strategy/git.rb b/Library/Homebrew/unpack_strategy/git.rb index fbed22cc38..ab39f3c4e0 100644 --- a/Library/Homebrew/unpack_strategy/git.rb +++ b/Library/Homebrew/unpack_strategy/git.rb @@ -6,8 +6,6 @@ require_relative "directory" module UnpackStrategy # Strategy for unpacking Git repositories. class Git < Directory - - def self.can_extract?(path) super && (path/".git").directory? end diff --git a/Library/Homebrew/unpack_strategy/gzip.rb b/Library/Homebrew/unpack_strategy/gzip.rb index 777b0a62c4..dbc70d2766 100644 --- a/Library/Homebrew/unpack_strategy/gzip.rb +++ b/Library/Homebrew/unpack_strategy/gzip.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".gz"] diff --git a/Library/Homebrew/unpack_strategy/jar.rb b/Library/Homebrew/unpack_strategy/jar.rb index 867274d505..21153d1c2b 100644 --- a/Library/Homebrew/unpack_strategy/jar.rb +++ b/Library/Homebrew/unpack_strategy/jar.rb @@ -8,8 +8,6 @@ module UnpackStrategy class Jar < Uncompressed extend T::Sig - - sig { returns(T::Array[String]) } def self.extensions [".apk", ".jar"] diff --git a/Library/Homebrew/unpack_strategy/lha.rb b/Library/Homebrew/unpack_strategy/lha.rb index b6811d2519..a8cdfdb4cf 100644 --- a/Library/Homebrew/unpack_strategy/lha.rb +++ b/Library/Homebrew/unpack_strategy/lha.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".lha", ".lzh"] diff --git a/Library/Homebrew/unpack_strategy/lua_rock.rb b/Library/Homebrew/unpack_strategy/lua_rock.rb index 56623e115d..d5ce7de33e 100644 --- a/Library/Homebrew/unpack_strategy/lua_rock.rb +++ b/Library/Homebrew/unpack_strategy/lua_rock.rb @@ -8,8 +8,6 @@ module UnpackStrategy class LuaRock < Uncompressed extend T::Sig - - sig { returns(T::Array[String]) } def self.extensions [".rock"] diff --git a/Library/Homebrew/unpack_strategy/lzip.rb b/Library/Homebrew/unpack_strategy/lzip.rb index cd4565ce93..d1f2c432af 100644 --- a/Library/Homebrew/unpack_strategy/lzip.rb +++ b/Library/Homebrew/unpack_strategy/lzip.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".lz"] diff --git a/Library/Homebrew/unpack_strategy/lzma.rb b/Library/Homebrew/unpack_strategy/lzma.rb index a5a4540796..bfe04be2c9 100644 --- a/Library/Homebrew/unpack_strategy/lzma.rb +++ b/Library/Homebrew/unpack_strategy/lzma.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".lzma"] diff --git a/Library/Homebrew/unpack_strategy/mercurial.rb b/Library/Homebrew/unpack_strategy/mercurial.rb index 835e38cdc8..72d9547933 100644 --- a/Library/Homebrew/unpack_strategy/mercurial.rb +++ b/Library/Homebrew/unpack_strategy/mercurial.rb @@ -6,8 +6,6 @@ require_relative "directory" module UnpackStrategy # Strategy for unpacking Mercurial repositories. class Mercurial < Directory - - def self.can_extract?(path) super && (path/".hg").directory? end diff --git a/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb b/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb index 0c831d8f6e..ad3940d86e 100644 --- a/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb +++ b/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb @@ -8,8 +8,6 @@ module UnpackStrategy class MicrosoftOfficeXml < Uncompressed extend T::Sig - - sig { returns(T::Array[String]) } def self.extensions [ diff --git a/Library/Homebrew/unpack_strategy/otf.rb b/Library/Homebrew/unpack_strategy/otf.rb index 29557f99d9..61ac40a249 100644 --- a/Library/Homebrew/unpack_strategy/otf.rb +++ b/Library/Homebrew/unpack_strategy/otf.rb @@ -8,8 +8,6 @@ module UnpackStrategy class Otf < Uncompressed extend T::Sig - - sig { returns(T::Array[String]) } def self.extensions [".otf"] diff --git a/Library/Homebrew/unpack_strategy/p7zip.rb b/Library/Homebrew/unpack_strategy/p7zip.rb index 36dc862d8a..715c816076 100644 --- a/Library/Homebrew/unpack_strategy/p7zip.rb +++ b/Library/Homebrew/unpack_strategy/p7zip.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".7z"] diff --git a/Library/Homebrew/unpack_strategy/pax.rb b/Library/Homebrew/unpack_strategy/pax.rb index 4b5ec1ad33..c454b57ab4 100644 --- a/Library/Homebrew/unpack_strategy/pax.rb +++ b/Library/Homebrew/unpack_strategy/pax.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".pax"] diff --git a/Library/Homebrew/unpack_strategy/pkg.rb b/Library/Homebrew/unpack_strategy/pkg.rb index 5d1837d9da..7151ba6078 100644 --- a/Library/Homebrew/unpack_strategy/pkg.rb +++ b/Library/Homebrew/unpack_strategy/pkg.rb @@ -8,8 +8,6 @@ module UnpackStrategy class Pkg < Uncompressed extend T::Sig - - sig { returns(T::Array[String]) } def self.extensions [".pkg", ".mkpg"] diff --git a/Library/Homebrew/unpack_strategy/rar.rb b/Library/Homebrew/unpack_strategy/rar.rb index 3f23099844..9a2be11326 100644 --- a/Library/Homebrew/unpack_strategy/rar.rb +++ b/Library/Homebrew/unpack_strategy/rar.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".rar"] diff --git a/Library/Homebrew/unpack_strategy/self_extracting_executable.rb b/Library/Homebrew/unpack_strategy/self_extracting_executable.rb index 67f2d820f3..a3ea1e8de1 100644 --- a/Library/Homebrew/unpack_strategy/self_extracting_executable.rb +++ b/Library/Homebrew/unpack_strategy/self_extracting_executable.rb @@ -8,8 +8,6 @@ module UnpackStrategy class SelfExtractingExecutable < GenericUnar extend T::Sig - - sig { returns(T::Array[String]) } def self.extensions [] diff --git a/Library/Homebrew/unpack_strategy/sit.rb b/Library/Homebrew/unpack_strategy/sit.rb index ac04355bf5..d747cb3178 100644 --- a/Library/Homebrew/unpack_strategy/sit.rb +++ b/Library/Homebrew/unpack_strategy/sit.rb @@ -8,8 +8,6 @@ module UnpackStrategy class Sit < GenericUnar extend T::Sig - - sig { returns(T::Array[String]) } def self.extensions [".sit"] diff --git a/Library/Homebrew/unpack_strategy/subversion.rb b/Library/Homebrew/unpack_strategy/subversion.rb index d20fe5664b..4097f13610 100644 --- a/Library/Homebrew/unpack_strategy/subversion.rb +++ b/Library/Homebrew/unpack_strategy/subversion.rb @@ -6,8 +6,6 @@ require_relative "directory" module UnpackStrategy # Strategy for unpacking Subversion repositories. class Subversion < Directory - - def self.can_extract?(path) super && (path/".svn").directory? end diff --git a/Library/Homebrew/unpack_strategy/tar.rb b/Library/Homebrew/unpack_strategy/tar.rb index e9641f936a..42ca323d33 100644 --- a/Library/Homebrew/unpack_strategy/tar.rb +++ b/Library/Homebrew/unpack_strategy/tar.rb @@ -11,8 +11,6 @@ module UnpackStrategy include UnpackStrategy extend SystemCommand::Mixin - - sig { returns(T::Array[String]) } def self.extensions [ diff --git a/Library/Homebrew/unpack_strategy/ttf.rb b/Library/Homebrew/unpack_strategy/ttf.rb index 17588ce827..bd0da5ea76 100644 --- a/Library/Homebrew/unpack_strategy/ttf.rb +++ b/Library/Homebrew/unpack_strategy/ttf.rb @@ -8,8 +8,6 @@ module UnpackStrategy class Ttf < Uncompressed extend T::Sig - - sig { returns(T::Array[String]) } def self.extensions [".ttc", ".ttf"] diff --git a/Library/Homebrew/unpack_strategy/xar.rb b/Library/Homebrew/unpack_strategy/xar.rb index db223e4b10..4707a602d5 100644 --- a/Library/Homebrew/unpack_strategy/xar.rb +++ b/Library/Homebrew/unpack_strategy/xar.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".xar"] diff --git a/Library/Homebrew/unpack_strategy/xz.rb b/Library/Homebrew/unpack_strategy/xz.rb index 71894af646..cc450d51d6 100644 --- a/Library/Homebrew/unpack_strategy/xz.rb +++ b/Library/Homebrew/unpack_strategy/xz.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".xz"] diff --git a/Library/Homebrew/unpack_strategy/zip.rb b/Library/Homebrew/unpack_strategy/zip.rb index 9495e4ac66..85ef33cbbb 100644 --- a/Library/Homebrew/unpack_strategy/zip.rb +++ b/Library/Homebrew/unpack_strategy/zip.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".zip"] diff --git a/Library/Homebrew/unpack_strategy/zstd.rb b/Library/Homebrew/unpack_strategy/zstd.rb index ab256ea5ac..c5f0b2a6b9 100644 --- a/Library/Homebrew/unpack_strategy/zstd.rb +++ b/Library/Homebrew/unpack_strategy/zstd.rb @@ -8,8 +8,6 @@ module UnpackStrategy include UnpackStrategy - - sig { returns(T::Array[String]) } def self.extensions [".zst"]