Merge pull request #15306 from dduugg/include-t-sig-everywhere
Include T::Sig in Module
This commit is contained in:
commit
ce1949605e
@ -280,9 +280,14 @@ RSpec/Focus:
|
||||
Sorbet/ConstantsFromStrings:
|
||||
Enabled: false
|
||||
|
||||
# This is already the default
|
||||
Sorbet/FalseSigil:
|
||||
Enabled: false
|
||||
|
||||
# T::Sig is monkey-patched into Module
|
||||
Sorbet/RedundantExtendTSig:
|
||||
Enabled: true
|
||||
|
||||
Sorbet/StrictSigil:
|
||||
inherit_mode:
|
||||
override:
|
||||
|
||||
@ -5,8 +5,6 @@
|
||||
#
|
||||
# @api private
|
||||
class PATH
|
||||
extend T::Sig
|
||||
|
||||
include Enumerable
|
||||
extend Forwardable
|
||||
|
||||
|
||||
@ -11,8 +11,6 @@ module Homebrew
|
||||
#
|
||||
# @api private
|
||||
module API
|
||||
extend T::Sig
|
||||
|
||||
extend Cachable
|
||||
|
||||
HOMEBREW_CACHE_API = (HOMEBREW_CACHE/"api").freeze
|
||||
|
||||
@ -8,8 +8,6 @@ module Homebrew
|
||||
# @api private
|
||||
module Analytics
|
||||
class << self
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def analytics_api_path
|
||||
"analytics"
|
||||
|
||||
@ -11,7 +11,6 @@ module Homebrew
|
||||
module Cask
|
||||
class << self
|
||||
include Cachable
|
||||
extend T::Sig
|
||||
|
||||
private :cache
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@ module Homebrew
|
||||
module Formula
|
||||
class << self
|
||||
include Cachable
|
||||
extend T::Sig
|
||||
|
||||
private :cache
|
||||
|
||||
|
||||
@ -5,8 +5,6 @@
|
||||
#
|
||||
# @api private
|
||||
class BuildEnvironment
|
||||
extend T::Sig
|
||||
|
||||
sig { params(settings: Symbol).void }
|
||||
def initialize(*settings)
|
||||
@settings = Set.new(settings)
|
||||
@ -31,8 +29,6 @@ class BuildEnvironment
|
||||
|
||||
# DSL for specifying build environment settings.
|
||||
module DSL
|
||||
extend T::Sig
|
||||
|
||||
# Initialise @env for each class which may use this DSL (e.g. each formula subclass).
|
||||
# `env` may never be called, and it needs to be initialised before the class is frozen.
|
||||
def inherited(child)
|
||||
|
||||
@ -8,8 +8,6 @@ module Homebrew
|
||||
#
|
||||
# @api private
|
||||
class BundleVersion
|
||||
extend T::Sig
|
||||
|
||||
include Comparable
|
||||
|
||||
extend SystemCommand::Mixin
|
||||
|
||||
@ -9,7 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class AbstractArtifact
|
||||
extend T::Sig
|
||||
extend T::Helpers
|
||||
abstract!
|
||||
|
||||
|
||||
@ -13,8 +13,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class AbstractUninstall < AbstractArtifact
|
||||
extend T::Sig
|
||||
|
||||
ORDERED_DIRECTIVES = [
|
||||
:early_script,
|
||||
:launchctl,
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Artifact < Moved
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def self.english_name
|
||||
"Generic Artifact"
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class KeyboardLayout < Moved
|
||||
extend T::Sig
|
||||
|
||||
def install_phase(**options)
|
||||
super(**options)
|
||||
delete_keyboard_layout_cache(**options)
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Mdimporter < Moved
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def self.english_name
|
||||
"Spotlight metadata importer"
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Moved < Relocated
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def self.english_description
|
||||
"#{english_name}s"
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Prefpane < Moved
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def self.english_name
|
||||
"Preference Pane"
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Qlplugin < Moved
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def self.english_name
|
||||
"QuickLook Plugin"
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Relocated < AbstractArtifact
|
||||
extend T::Sig
|
||||
|
||||
def self.from_args(cask, *args)
|
||||
source_string, target_hash = args
|
||||
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class StageOnly < AbstractArtifact
|
||||
extend T::Sig
|
||||
|
||||
def self.from_args(cask, *args, **kwargs)
|
||||
if (args != [true] && args != ["true"]) || kwargs.present?
|
||||
raise CaskInvalidError.new(cask.token, "'stage_only' takes only a single argument: true")
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Suite < Moved
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def self.english_name
|
||||
"App Suite"
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Symlinked < Relocated
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def self.link_type_english_name
|
||||
"Symlink"
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Vst3Plugin < Moved
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def self.english_name
|
||||
"VST3 Plugin"
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class VstPlugin < Moved
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def self.english_name
|
||||
"VST Plugin"
|
||||
|
||||
@ -14,8 +14,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Audit
|
||||
extend T::Sig
|
||||
|
||||
extend Predicable
|
||||
|
||||
attr_reader :cask, :download
|
||||
|
||||
@ -6,8 +6,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
module Cache
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(Pathname) }
|
||||
def self.path
|
||||
@path ||= HOMEBREW_CACHE/"Cask"
|
||||
|
||||
@ -13,8 +13,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Cask
|
||||
extend T::Sig
|
||||
|
||||
extend Forwardable
|
||||
extend Predicable
|
||||
extend APIHashable
|
||||
|
||||
@ -13,7 +13,6 @@ module Cask
|
||||
extend Context
|
||||
|
||||
module ILoader
|
||||
extend T::Sig
|
||||
extend T::Helpers
|
||||
interface!
|
||||
|
||||
@ -110,8 +109,6 @@ module Cask
|
||||
|
||||
# Loads a cask from a URI.
|
||||
class FromURILoader < FromPathLoader
|
||||
extend T::Sig
|
||||
|
||||
def self.can_load?(ref)
|
||||
# Cache compiled regex
|
||||
@uri_regex ||= begin
|
||||
@ -362,8 +359,6 @@ module Cask
|
||||
|
||||
# Pseudo-loader which raises an error when trying to load the corresponding cask.
|
||||
class NullLoader < FromPathLoader
|
||||
extend T::Sig
|
||||
|
||||
def self.can_load?(*)
|
||||
true
|
||||
end
|
||||
|
||||
@ -8,8 +8,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
module Caskroom
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(Pathname) }
|
||||
def self.path
|
||||
@path ||= HOMEBREW_PREFIX/"Caskroom"
|
||||
|
||||
@ -11,8 +11,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Config
|
||||
extend T::Sig
|
||||
|
||||
DEFAULT_DIRS = {
|
||||
appdir: "/Applications",
|
||||
keyboard_layoutdir: "/Library/Keyboard Layouts",
|
||||
|
||||
@ -6,8 +6,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
module Denylist
|
||||
extend T::Sig
|
||||
|
||||
sig { params(name: String).returns(T.nilable(String)) }
|
||||
def self.reason(name)
|
||||
case name
|
||||
|
||||
@ -11,7 +11,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class DependsOn < SimpleDelegator
|
||||
extend T::Sig
|
||||
VALID_KEYS = Set.new([
|
||||
:formula,
|
||||
:cask,
|
||||
|
||||
@ -7,8 +7,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Version < ::String
|
||||
extend T::Sig
|
||||
|
||||
DIVIDERS = {
|
||||
"." => :dots,
|
||||
"-" => :hyphens,
|
||||
|
||||
@ -11,8 +11,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class MultipleCaskErrors < CaskError
|
||||
extend T::Sig
|
||||
|
||||
def initialize(errors)
|
||||
super()
|
||||
|
||||
@ -32,8 +30,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class AbstractCaskErrorWithToken < CaskError
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
attr_reader :token
|
||||
|
||||
@ -52,8 +48,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskNotInstalledError < AbstractCaskErrorWithToken
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
"Cask '#{token}' is not installed."
|
||||
@ -64,8 +58,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskConflictError < AbstractCaskErrorWithToken
|
||||
extend T::Sig
|
||||
|
||||
attr_reader :conflicting_cask
|
||||
|
||||
def initialize(token, conflicting_cask)
|
||||
@ -83,8 +75,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskUnavailableError < AbstractCaskErrorWithToken
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
"Cask '#{token}' is unavailable#{reason.empty? ? "." : ": #{reason}"}"
|
||||
@ -95,8 +85,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskUnreadableError < CaskUnavailableError
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
"Cask '#{token}' is unreadable#{reason.empty? ? "." : ": #{reason}"}"
|
||||
@ -107,8 +95,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class TapCaskUnavailableError < CaskUnavailableError
|
||||
extend T::Sig
|
||||
|
||||
attr_reader :tap
|
||||
|
||||
def initialize(tap, token)
|
||||
@ -128,8 +114,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class TapCaskAmbiguityError < CaskError
|
||||
extend T::Sig
|
||||
|
||||
def initialize(ref, loaders)
|
||||
super <<~EOS
|
||||
Cask #{ref} exists in multiple taps:
|
||||
@ -142,8 +126,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskAlreadyCreatedError < AbstractCaskErrorWithToken
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
%Q(Cask '#{token}' already exists. Run #{Formatter.identifier("brew edit --cask #{token}")} to edit it.)
|
||||
@ -154,8 +136,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskAlreadyInstalledError < AbstractCaskErrorWithToken
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
<<~EOS
|
||||
@ -171,8 +151,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskCyclicDependencyError < AbstractCaskErrorWithToken
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
"Cask '#{token}' includes cyclic dependencies on other Casks#{reason.empty? ? "." : ": #{reason}"}"
|
||||
@ -183,8 +161,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskSelfReferencingDependencyError < CaskCyclicDependencyError
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
"Cask '#{token}' depends on itself."
|
||||
@ -195,8 +171,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskUnspecifiedError < CaskError
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
"This command requires a Cask token."
|
||||
@ -207,8 +181,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskInvalidError < AbstractCaskErrorWithToken
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
"Cask '#{token}' definition is invalid#{reason.empty? ? "." : ": #{reason}"}"
|
||||
@ -228,8 +200,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskQuarantineError < CaskError
|
||||
extend T::Sig
|
||||
|
||||
attr_reader :path, :reason
|
||||
|
||||
def initialize(path, reason)
|
||||
@ -257,8 +227,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskQuarantinePropagationError < CaskQuarantineError
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
s = +"Failed to quarantine one or more files within #{path}."
|
||||
@ -277,8 +245,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class CaskQuarantineReleaseError < CaskQuarantineError
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(String) }
|
||||
def to_s
|
||||
s = +"Failed to release #{path} from quarantine."
|
||||
|
||||
@ -16,8 +16,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Installer
|
||||
extend T::Sig
|
||||
|
||||
extend Predicable
|
||||
|
||||
def initialize(cask, command: SystemCommand, force: false, adopt: false,
|
||||
|
||||
@ -8,8 +8,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
class Pkg
|
||||
extend T::Sig
|
||||
|
||||
sig { params(regexp: String, command: T.class_of(SystemCommand)).returns(T::Array[Pkg]) }
|
||||
def self.all_matching(regexp, command)
|
||||
command.run("/usr/sbin/pkgutil", args: ["--pkgs=#{regexp}"]).stdout.split("\n").map do |package_id|
|
||||
|
||||
@ -9,8 +9,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
module Quarantine
|
||||
extend T::Sig
|
||||
|
||||
QUARANTINE_ATTRIBUTE = "com.apple.quarantine"
|
||||
|
||||
QUARANTINE_SCRIPT = (HOMEBREW_LIBRARY_PATH/"cask/utils/quarantine.swift").freeze
|
||||
|
||||
@ -8,8 +8,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
module Staged
|
||||
extend T::Sig
|
||||
|
||||
# FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed.
|
||||
# rubocop:disable Style/MutableConstant
|
||||
Paths = T.type_alias { T.any(String, Pathname, T::Array[T.any(String, Pathname)]) }
|
||||
|
||||
@ -7,8 +7,6 @@ require "cask/config"
|
||||
module Cask
|
||||
# @api private
|
||||
class Upgrade
|
||||
extend T::Sig
|
||||
|
||||
sig {
|
||||
params(
|
||||
casks: Cask,
|
||||
|
||||
@ -5,12 +5,8 @@
|
||||
#
|
||||
# @api private
|
||||
class URL < Delegator
|
||||
extend T::Sig
|
||||
|
||||
# @api private
|
||||
class DSL
|
||||
extend T::Sig
|
||||
|
||||
attr_reader :uri, :specs,
|
||||
:verified, :using,
|
||||
:tag, :branch, :revisions, :revision,
|
||||
@ -79,12 +75,8 @@ class URL < Delegator
|
||||
|
||||
# @api private
|
||||
class BlockDSL
|
||||
extend T::Sig
|
||||
|
||||
# To access URL associated with page contents.
|
||||
module PageWithURL
|
||||
extend T::Sig
|
||||
|
||||
# @api public
|
||||
sig { returns(URI::Generic) }
|
||||
attr_accessor :url
|
||||
|
||||
@ -11,8 +11,6 @@ module Cask
|
||||
#
|
||||
# @api private
|
||||
module Utils
|
||||
extend T::Sig
|
||||
|
||||
def self.gain_permissions_remove(path, command: SystemCommand)
|
||||
if path.respond_to?(:rmtree) && path.exist?
|
||||
gain_permissions(path, ["-R"], command) do |p|
|
||||
|
||||
@ -16,8 +16,6 @@ module Homebrew
|
||||
private_constant :CLEANUP_DEFAULT_DAYS
|
||||
|
||||
class << self
|
||||
extend T::Sig
|
||||
|
||||
sig { params(pathname: Pathname).returns(T::Boolean) }
|
||||
def incomplete?(pathname)
|
||||
pathname.extname.end_with?(".incomplete")
|
||||
|
||||
@ -6,8 +6,6 @@ require "ostruct"
|
||||
module Homebrew
|
||||
module CLI
|
||||
class Args < OpenStruct
|
||||
extend T::Sig
|
||||
|
||||
attr_reader :options_only, :flags_only
|
||||
|
||||
# undefine tap to allow --tap argument
|
||||
|
||||
@ -11,8 +11,6 @@ module Homebrew
|
||||
#
|
||||
# @api private
|
||||
class NamedArgs < Array
|
||||
extend T::Sig
|
||||
|
||||
def initialize(*args, parent: Args.new, override_spec: nil, force_bottle: false, flags: [], cask_options: false)
|
||||
require "cask/cask"
|
||||
require "cask/cask_loader"
|
||||
|
||||
@ -15,8 +15,6 @@ HIDDEN_DESC_PLACEHOLDER = "@@HIDDEN@@"
|
||||
module Homebrew
|
||||
module CLI
|
||||
class Parser
|
||||
extend T::Sig
|
||||
|
||||
attr_reader :processed_options, :hide_from_man_page, :named_args_type
|
||||
|
||||
def self.from_cmd_path(cmd_path)
|
||||
@ -680,8 +678,6 @@ module Homebrew
|
||||
end
|
||||
|
||||
class MaxNamedArgumentsError < UsageError
|
||||
extend T::Sig
|
||||
|
||||
sig { params(maximum: Integer, types: T::Array[Symbol]).void }
|
||||
def initialize(maximum, types: [])
|
||||
super case maximum
|
||||
@ -698,8 +694,6 @@ module Homebrew
|
||||
end
|
||||
|
||||
class MinNamedArgumentsError < UsageError
|
||||
extend T::Sig
|
||||
|
||||
sig { params(minimum: Integer, types: T::Array[Symbol]).void }
|
||||
def initialize(minimum, types: [])
|
||||
types << :named if types.empty?
|
||||
@ -711,8 +705,6 @@ module Homebrew
|
||||
end
|
||||
|
||||
class NumberOfNamedArgumentsError < UsageError
|
||||
extend T::Sig
|
||||
|
||||
sig { params(minimum: Integer, types: T::Array[Symbol]).void }
|
||||
def initialize(minimum, types: [])
|
||||
types << :named if types.empty?
|
||||
|
||||
@ -6,8 +6,6 @@ require "cli/parser"
|
||||
require "cask/download"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
extend Fetch
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -7,8 +7,6 @@ require "utils/shell"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def self.__prefix_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -5,8 +5,6 @@ require "cleanup"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -5,8 +5,6 @@ require "cli/parser"
|
||||
require "completions"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -5,8 +5,6 @@ require "system_config"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -7,8 +7,6 @@ require "cask/caskroom"
|
||||
require "dependencies_helpers"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
extend DependenciesHelpers
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -7,8 +7,6 @@ require "description_cache_store"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -6,8 +6,6 @@ require "cli/parser"
|
||||
require "cask/caskroom"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def self.doctor_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
|
||||
@ -7,8 +7,6 @@ require "cli/parser"
|
||||
require "cask/download"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
extend Fetch
|
||||
|
||||
FETCH_MAX_TRIES = 5
|
||||
|
||||
@ -9,8 +9,6 @@ require "socket"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
extend Install
|
||||
|
||||
module_function
|
||||
|
||||
@ -5,8 +5,6 @@ require "cli/parser"
|
||||
require "formula"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -14,8 +14,6 @@ require "deprecate_disable"
|
||||
require "api"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
VALID_DAYS = %w[30 90 365].freeze
|
||||
|
||||
@ -13,8 +13,6 @@ require "cli/parser"
|
||||
require "upgrade"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def self.install_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
|
||||
@ -5,8 +5,6 @@ require "formula"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -6,8 +6,6 @@ require "cli/parser"
|
||||
require "unlink"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -7,8 +7,6 @@ require "cli/parser"
|
||||
require "cask/list"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def self.log_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
|
||||
@ -5,8 +5,6 @@ require "migrator"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -7,8 +7,6 @@ require "diagnostic"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -5,8 +5,6 @@ require "formula"
|
||||
require "options"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -8,8 +8,6 @@ require "cask/caskroom"
|
||||
require "api"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def self.outdated_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
|
||||
@ -5,8 +5,6 @@ require "formula"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -6,8 +6,6 @@ require "formula_installer"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -6,8 +6,6 @@ require "cli/parser"
|
||||
require "env_config"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -15,8 +15,6 @@ require "upgrade"
|
||||
require "api"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def self.reinstall_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
|
||||
@ -8,8 +8,6 @@ require "cli/parser"
|
||||
require "search"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
PACKAGE_MANAGERS = {
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -13,8 +13,6 @@ require "cask/uninstall"
|
||||
require "uninstall"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -5,8 +5,6 @@ require "cli/parser"
|
||||
require "unlink"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -5,8 +5,6 @@ require "formula"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -11,8 +11,6 @@ require "settings"
|
||||
require "linuxbrew-core-migration"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
def auto_update_header(args:)
|
||||
@ -607,8 +605,6 @@ class Reporter
|
||||
end
|
||||
|
||||
class ReporterHub
|
||||
extend T::Sig
|
||||
|
||||
extend Forwardable
|
||||
|
||||
attr_reader :reporters
|
||||
|
||||
@ -11,8 +11,6 @@ require "cask/macos"
|
||||
require "api"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -12,8 +12,6 @@ require "dependencies_helpers"
|
||||
require "ostruct"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
extend DependenciesHelpers
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -100,7 +100,6 @@ end
|
||||
#
|
||||
# @api private
|
||||
class CompilerSelector
|
||||
extend T::Sig
|
||||
include CompilerConstants
|
||||
|
||||
Compiler = Struct.new(:type, :name, :version)
|
||||
|
||||
@ -10,8 +10,6 @@ module Homebrew
|
||||
#
|
||||
# @api private
|
||||
module Completions
|
||||
extend T::Sig
|
||||
|
||||
Variables = Struct.new(
|
||||
:aliases,
|
||||
:builtin_command_descriptions,
|
||||
|
||||
@ -5,8 +5,6 @@ require "compilers"
|
||||
|
||||
# Combination of C++ standard library and compiler.
|
||||
class CxxStdlib
|
||||
extend T::Sig
|
||||
|
||||
def self.create(type, compiler)
|
||||
raise ArgumentError, "Invalid C++ stdlib type: #{type}" if type && [:libstdcxx, :libcxx].exclude?(type)
|
||||
|
||||
|
||||
@ -28,8 +28,6 @@ module Debrew
|
||||
|
||||
# Module for displaying a debugging menu.
|
||||
class Menu
|
||||
extend T::Sig
|
||||
|
||||
Entry = Struct.new(:name, :action)
|
||||
|
||||
attr_accessor :prompt, :entries
|
||||
|
||||
@ -7,8 +7,6 @@ require "delegate"
|
||||
#
|
||||
# @api private
|
||||
class Dependencies < SimpleDelegator
|
||||
extend T::Sig
|
||||
|
||||
def initialize(*args)
|
||||
super(args)
|
||||
end
|
||||
@ -45,8 +43,6 @@ end
|
||||
#
|
||||
# @api private
|
||||
class Requirements < SimpleDelegator
|
||||
extend T::Sig
|
||||
|
||||
def initialize(*args)
|
||||
super(Set.new(args))
|
||||
end
|
||||
|
||||
@ -7,8 +7,6 @@ require "dependable"
|
||||
#
|
||||
# @api private
|
||||
class Dependency
|
||||
extend T::Sig
|
||||
|
||||
extend Forwardable
|
||||
include Dependable
|
||||
extend Cachable
|
||||
@ -82,8 +80,6 @@ class Dependency
|
||||
end
|
||||
|
||||
class << self
|
||||
extend T::Sig
|
||||
|
||||
# Expand the dependencies of each dependent recursively, optionally yielding
|
||||
# `[dependent, dep]` pairs to allow callers to apply arbitrary filters to
|
||||
# the list.
|
||||
|
||||
@ -18,8 +18,6 @@ require "extend/cachable"
|
||||
# This class is used by `depends_on` in the formula DSL to turn dependency
|
||||
# specifications into the proper kinds of dependencies and requirements.
|
||||
class DependencyCollector
|
||||
extend T::Sig
|
||||
|
||||
extend Cachable
|
||||
|
||||
attr_reader :deps, :requirements
|
||||
|
||||
@ -20,8 +20,6 @@ require "formula_auditor"
|
||||
require "tap_auditor"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def self.audit_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
|
||||
@ -36,8 +36,6 @@ ALLOWABLE_HOMEBREW_REPOSITORY_LINKS = [
|
||||
].freeze
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def self.bottle_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
|
||||
@ -7,8 +7,6 @@ require "cli/parser"
|
||||
require "utils/tar"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -7,8 +7,6 @@ require "utils/pypi"
|
||||
require "utils/tar"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -5,8 +5,6 @@ require "formula"
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -10,8 +10,6 @@ require "tap"
|
||||
require "unversioned_cask_checker"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
extend SystemCommand::Mixin
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -5,8 +5,6 @@ require "cli/parser"
|
||||
require "livecheck/livecheck"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
require "cli/parser"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def self.cat_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user