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