language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | Homebrew | brew | 844fa3bbd5c1114a2edc1d28eb3e54e263b2b18b.json | spec_helper: increase needs_network timeout and retry.
This should help with flakiness on these tests. | Library/Homebrew/test/spec_helper.rb | @@ -78,7 +78,8 @@
config.default_retry_count = 2
config.around(:each, :needs_network) do |example|
- example.run_with_retry retry: 3, retry_wait: 3
+ example.metadata[:timeout] ||= 120
+ example.run_with_retry retry: 5, retry_wait: 5
end
end
| false |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/.rubocop.yml | @@ -163,6 +163,10 @@ Performance/CaseWhenSplat:
Performance/Caller:
Enabled: false
+# Makes code less readable for minor performance increases.
+Performance/MethodObjectAsBlock:
+ Enabled: false
+
# Don't allow cops to be disabled in casks and formulae.
Style/DisableCopsWithinSourceCodeDirective:
Enabled: t... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/cask/cask.rb | @@ -22,7 +22,7 @@ class Cask
attr_reader :token, :sourcefile_path, :config, :default_config
def self.each(&block)
- return to_enum unless block_given?
+ return to_enum unless block
Tap.flat_map(&:cask_files).each do |f|
block.call CaskLoader::FromTapPathLoader.new(f).load(config:... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/cask/cmd.rb | @@ -84,7 +84,7 @@ def self.description
def self.parser(&block)
Homebrew::CLI::Parser.new do
- if block_given?
+ if block
instance_eval(&block)
else
usage_banner <<~EOS | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/cask/cmd/abstract_command.rb | @@ -68,7 +68,7 @@ def self.parser(&block)
Cmd.parser do
usage_banner banner
- instance_eval(&block) if block_given?
+ instance_eval(&block) if block
OPTIONS.each do |option|
send(*option) | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/cask/cmd/install.rb | @@ -34,7 +34,7 @@ def self.parser(&block)
send(*option)
end
- instance_eval(&block) if block_given?
+ instance_eval(&block) if block
end
end
| true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/cask/dsl.rb | @@ -125,7 +125,7 @@ def homepage(homepage = nil)
def language(*args, default: false, &block)
if args.empty?
language_eval
- elsif block_given?
+ elsif block
@language_blocks ||= {}
@language_blocks[args] = block
@@ -248,7 +248,7 @@ def staged_path
def caveats(*s... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/cli/parser.rb | @@ -136,7 +136,7 @@ def initialize(&block)
switch short, long, description: desc, env: option_to_name(long), method: :on_tail
end
- instance_eval(&block) if block_given?
+ instance_eval(&block) if block
end
def switch(*names, description: nil, env: nil, required_for: ... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/compilers.rb | @@ -56,7 +56,7 @@ def self.create(spec, &block)
def initialize(name, version, &block)
@name = name
@version = Version.parse(version.to_s)
- instance_eval(&block) if block_given?
+ instance_eval(&block) if block
end
def fails_with?(compiler) | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/dependency.rb | @@ -120,9 +120,9 @@ def expand(dependent, deps = dependent.deps, &block)
@expand_stack.pop
end
- def action(dependent, dep, &_block)
+ def action(dependent, dep, &block)
catch(:action) do
- if block_given?
+ if block
yield dependent, dep
elsif dep.optional? |... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/extend/os/linux/formula.rb | @@ -4,8 +4,8 @@
class Formula
undef on_linux
- def on_linux(&_block)
- raise "No block content defined for on_linux block" unless block_given?
+ def on_linux(&block)
+ raise "No block content defined for on_linux block" unless block
yield
end
@@ -19,8 +19,8 @@ def shared_library(name, version = ... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/extend/os/mac/formula.rb | @@ -4,17 +4,17 @@
class Formula
undef on_macos
- def on_macos(&_block)
- raise "No block content defined for on_macos block" unless block_given?
+ def on_macos(&block)
+ raise "No block content defined for on_macos block" unless block
yield
end
class << self
undef on_macos
- def o... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/formula.rb | @@ -282,7 +282,7 @@ def validate_attributes!
# and is specified to this instance.
def installed_alias_path
path = build.source["path"] if build.is_a?(Tab)
- return unless path&.match?(%r{#{HOMEBREW_TAP_DIR_REGEX}/Aliases})
+ return unless path&.match?(%r{#{HOMEBREW_TAP_DIR_REGEX}/Aliases}o)
return... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/language/python.rb | @@ -270,7 +270,7 @@ def create
next unless f.symlink?
next unless (rp = f.realpath.to_s).start_with? HOMEBREW_CELLAR
- version = rp.match %r{^#{HOMEBREW_CELLAR}/python@(.*?)/}
+ version = rp.match %r{^#{HOMEBREW_CELLAR}/python@(.*?)/}o
version = "@#{version... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/linkage_checker.rb | @@ -129,7 +129,7 @@ def broken_dylibs_with_expectations
private
def dylib_to_dep(dylib)
- dylib =~ %r{#{Regexp.escape(HOMEBREW_PREFIX)}/(opt|Cellar)/([\w+-.@]+)/}
+ dylib =~ %r{#{Regexp.escape(HOMEBREW_PREFIX)}/(opt|Cellar)/([\w+-.@]+)/}o
Regexp.last_match(2)
end
| true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/requirement.rb | @@ -82,7 +82,7 @@ def satisfied_result_parent
return unless @satisfied_result.is_a?(Pathname)
parent = @satisfied_result.resolved_path.parent
- if parent.to_s =~ %r{^#{Regexp.escape(HOMEBREW_CELLAR)}/([\w+-.@]+)/[^/]+/(s?bin)/?$}
+ if parent.to_s =~ %r{^#{Regexp.escape(HOMEBREW_CELLAR)}/([\w+-.@]+)/[^... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/resource.rb | @@ -32,7 +32,7 @@ def initialize(name = nil, &block)
@checksum = nil
@using = nil
@patches = []
- instance_eval(&block) if block_given?
+ instance_eval(&block) if block
end
def owner=(owner) | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/software_spec.rb | @@ -107,7 +107,7 @@ def resource_defined?(name)
end
def resource(name, klass = Resource, &block)
- if block_given?
+ if block
raise DuplicateResourceError, name if resource_defined?(name)
res = klass.new(name, &block) | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/tap.rb | @@ -586,7 +586,7 @@ def ==(other)
def self.each(&block)
return unless TAP_DIRECTORY.directory?
- return to_enum unless block_given?
+ return to_enum unless block
TAP_DIRECTORY.subdirs.each do |user|
user.subdirs.each do |repo| | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/test/cmd/--cache_spec.rb | @@ -10,14 +10,14 @@
describe "brew --cache", :integration_test do
it "prints all cache files for a given Formula" do
expect { brew "--cache", testball }
- .to output(%r{#{HOMEBREW_CACHE}/downloads/[\da-f]{64}--testball-}).to_stdout
+ .to output(%r{#{HOMEBREW_CACHE}/downloads/[\da-f]{64}--testball-}o)... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/test/cmd/--cellar_spec.rb | @@ -10,7 +10,7 @@
describe "brew --cellar", :integration_test do
it "returns the Cellar subdirectory for a given Formula" do
expect { brew "--cellar", testball }
- .to output(%r{#{HOMEBREW_CELLAR}/testball}).to_stdout
+ .to output(%r{#{HOMEBREW_CELLAR}/testball}o).to_stdout
.and not_to_output.... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/test/cmd/--prefix_spec.rb | @@ -10,7 +10,7 @@
describe "brew --prefix", :integration_test do
it "prints a given Formula's prefix" do
expect { brew "--prefix", testball }
- .to output(%r{#{HOMEBREW_CELLAR}/testball}).to_stdout
+ .to output(%r{#{HOMEBREW_CELLAR}/testball}o).to_stdout
.and not_to_output.to_stderr
.an... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/test/cmd/--version_spec.rb | @@ -10,7 +10,7 @@
describe "brew --version", :integration_test do
it "prints the Homebrew version" do
expect { brew "--version" }
- .to output(/^Homebrew #{Regexp.escape(HOMEBREW_VERSION)}\n/).to_stdout
+ .to output(/^Homebrew #{Regexp.escape(HOMEBREW_VERSION)}\n/o).to_stdout
.and not_to_outpu... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/test/cmd/cleanup_spec.rb | @@ -22,7 +22,7 @@
(HOMEBREW_CACHE/"test").write "test"
expect { brew "cleanup", "--prune=all" }
- .to output(%r{#{Regexp.escape(HOMEBREW_CACHE)}/test}).to_stdout
+ .to output(%r{#{Regexp.escape(HOMEBREW_CACHE)}/test}o).to_stdout
.and not_to_output.to_stderr
.and be_a_succ... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/test/cmd/config_spec.rb | @@ -10,7 +10,7 @@
describe "brew config", :integration_test do
it "prints information about the current Homebrew configuration" do
expect { brew "config" }
- .to output(/HOMEBREW_VERSION: #{Regexp.escape HOMEBREW_VERSION}/).to_stdout
+ .to output(/HOMEBREW_VERSION: #{Regexp.escape HOMEBREW_VERSION}/o... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/test/cmd/install_spec.rb | @@ -12,7 +12,7 @@
setup_test_formula "testball1"
expect { brew "install", "testball1" }
- .to output(%r{#{HOMEBREW_CELLAR}/testball1/0\.1}).to_stdout
+ .to output(%r{#{HOMEBREW_CELLAR}/testball1/0\.1}o).to_stdout
.and not_to_output.to_stderr
.and be_a_success
expect(HOMEBREW_CEL... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/test/dev-cmd/command_spec.rb | @@ -10,7 +10,7 @@
describe "brew command", :integration_test do
it "returns the file for a given command" do
expect { brew "command", "info" }
- .to output(%r{#{Regexp.escape(HOMEBREW_LIBRARY_PATH)}/cmd/info.rb}).to_stdout
+ .to output(%r{#{Regexp.escape(HOMEBREW_LIBRARY_PATH)}/cmd/info.rb}o).to_stdo... | true |
Other | Homebrew | brew | 0184e271d844c04ccf023b86f157464a86a2a190.json | Fix RuboCop offenses. | Library/Homebrew/test/diagnostic_checks_spec.rb | @@ -66,7 +66,7 @@
specify "#check_user_path_2" do
ENV["PATH"] = ENV["PATH"].gsub \
- %r{(?:^|#{File::PATH_SEPARATOR})#{HOMEBREW_PREFIX}/bin}, ""
+ %r{(?:^|#{File::PATH_SEPARATOR})#{HOMEBREW_PREFIX}/bin}o, ""
expect(subject.check_user_path_1).to be nil
expect(subject.check_user_path_2) | true |
Other | Homebrew | brew | 4f330c5e19d0a0167b9ba49d04372e3b488930c2.json | macos_requirement: fix display of versions as array | Library/Homebrew/requirements/macos_requirement.rb | @@ -75,9 +75,15 @@ def inspect
sig { returns(String) }
def display_s
- return "macOS" unless version_specified?
-
- "macOS #{@comparator} #{@version}"
+ if version_specified?
+ if @version.respond_to?(:to_ary)
+ "macOS #{@comparator} #{version.join(" / ")}"
+ else
+ "macOS #{@co... | false |
Other | Homebrew | brew | 3ee66d8c0d3935d7d6b8c5626ac94a1eb9d2ee85.json | Add type annotations related to upgrade. | Library/.rubocop.yml | @@ -69,7 +69,7 @@ Naming/HeredocDelimiterNaming:
Naming/MethodName:
IgnoredPatterns:
- - '\AHEAD\?\Z'
+ - '\A(fetch_)?HEAD\?\Z'
# Allow dashes in filenames.
Naming/FileName: | true |
Other | Homebrew | brew | 3ee66d8c0d3935d7d6b8c5626ac94a1eb9d2ee85.json | Add type annotations related to upgrade. | Library/Homebrew/cask/caskroom.rb | @@ -8,6 +8,8 @@ module Cask
#
# @api private
module Caskroom
+ extend T::Sig
+
module_function
def path
@@ -30,6 +32,7 @@ def ensure_caskroom_exists
SystemCommand.run("/usr/bin/chgrp", args: ["admin", path], sudo: sudo)
end
+ sig { params(config: Config).returns(T::Array[Cask]) ... | true |
Other | Homebrew | brew | 3ee66d8c0d3935d7d6b8c5626ac94a1eb9d2ee85.json | Add type annotations related to upgrade. | Library/Homebrew/cask/cmd/upgrade.rb | @@ -26,6 +26,7 @@ def self.description
}],
].freeze
+ sig { returns(Homebrew::CLI::Parser) }
def self.parser
super do
switch "--force",
@@ -56,6 +57,20 @@ def run
)
end
+ sig do
+ params(
+ casks: Cask,
+ args: ... | true |
Other | Homebrew | brew | 3ee66d8c0d3935d7d6b8c5626ac94a1eb9d2ee85.json | Add type annotations related to upgrade. | Library/Homebrew/cli/args.rb | @@ -24,7 +24,7 @@ def initialize
# Can set these because they will be overwritten by freeze_named_args!
# (whereas other values below will only be overwritten if passed).
- self[:named_args] = NamedArgs.new(parent: self)
+ self[:named] = NamedArgs.new(parent: self)
self[:remai... | true |
Other | Homebrew | brew | 3ee66d8c0d3935d7d6b8c5626ac94a1eb9d2ee85.json | Add type annotations related to upgrade. | Library/Homebrew/cli/args.rbi | @@ -3,27 +3,62 @@
module Homebrew
module CLI
class Args < OpenStruct
+ sig { returns(T.nilable(T::Boolean)) }
def devel?; end
+ sig { returns(T.nilable(T::Boolean)) }
def HEAD?; end
+ sig { returns(T.nilable(T::Boolean)) }
def include_test?; end
+ sig { returns(T.... | true |
Other | Homebrew | brew | 3ee66d8c0d3935d7d6b8c5626ac94a1eb9d2ee85.json | Add type annotations related to upgrade. | Library/Homebrew/cli/named_args.rb | @@ -13,7 +13,7 @@ module CLI
# Helper class for loading formulae/casks from named arguments.
#
# @api private
- class NamedArgs < SimpleDelegator
+ class NamedArgs < Array
def initialize(*args, parent: Args.new, override_spec: nil, force_bottle: false, flags: [])
@args = args
... | true |
Other | Homebrew | brew | 3ee66d8c0d3935d7d6b8c5626ac94a1eb9d2ee85.json | Add type annotations related to upgrade. | Library/Homebrew/cmd/upgrade.rb | @@ -92,6 +92,7 @@ def upgrade_args
end
end
+ sig { void }
def upgrade
args = upgrade_args.parse
@@ -109,6 +110,7 @@ def upgrade
upgrade_outdated_casks(casks, args: args) unless upgrade_formulae
end
+ sig { params(formulae: T::Array[Formula], args: CLI::Args).void }
def upgrade_outdate... | true |
Other | Homebrew | brew | 3ee66d8c0d3935d7d6b8c5626ac94a1eb9d2ee85.json | Add type annotations related to upgrade. | Library/Homebrew/test/cli/parser_spec.rb | @@ -62,7 +62,7 @@
it "passes through invalid options" do
args = parser.parse(["-v", "named-arg", "--not-a-valid-option"], ignore_invalid_options: true)
expect(args.remaining).to eq ["named-arg", "--not-a-valid-option"]
- expect(args.named_args).to be_empty
+ expect(args.named).to ... | true |
Other | Homebrew | brew | 19f3acea41956ac87714f0ebbfa925b16b6ecbf2.json | manpage: update instructions & description in template file | Library/Homebrew/manpages/brew.1.md.erb | @@ -1,16 +1,20 @@
<%
# To make changes to this man page:
#
-# - For changes to a specific command (appears in the `COMMANDS` section):
-# - Edit the top comment in `Library/Homebrew/cmd/<command>.{rb,sh}`.
-# - Make sure to use the line prefix `#:` for the comments to be recognized as
-# documentation. If in... | false |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/PATH.rb | @@ -67,12 +67,9 @@ def to_str
sig { params(other: T.untyped).returns(T::Boolean) }
def ==(other)
- if other.respond_to?(:to_ary) && to_ary == other.to_ary ||
- other.respond_to?(:to_str) && to_str == other.to_str
- true
- else
+ (other.respond_to?(:to_ary) && to_ary == other.to_ary) ||
+ ... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/build.rb | @@ -62,7 +62,9 @@ def expand_reqs
def expand_deps
formula.recursive_dependencies do |dependent, dep|
build = effective_build_options_for(dependent)
- if dep.prune_from_option?(build) || dep.prune_if_build_and_not_dependent?(dependent, formula) || dep.test?
+ if dep.prune_from_option?(build) ||
... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/cask/cmd/audit.rb | @@ -60,11 +60,10 @@ def run
options[:quarantine] = true if options[:quarantine].nil?
casks = args.named.flat_map do |name|
- if File.exist?(name) && name.count("/") != 1
- name
- else
- Tap.fetch(name).cask_files
- end
+ next name if File.exi... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/cleaner.rb | @@ -76,6 +76,12 @@ def executable_path?(path)
path.text_executable? || path.executable?
end
+ # Both these files are completely unnecessary to package and cause
+ # pointless conflicts with other formulae. They are removed by Debian,
+ # Arch & MacPorts amongst other packagers as well. The files are
+ # c... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/dev-cmd/bottle.rb | @@ -440,22 +440,14 @@ def merge(args:)
if key == "cellar"
# Prioritize HOMEBREW_CELLAR over :any over :any_skip_relocation
cellars = [first, second]
- if cellars.include?(HOMEBREW_CELLAR)
- HOMEBREW_CELLAR
- elsif first.start_with?("/")
- first
- ... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/download_strategy.rb | @@ -1233,9 +1233,9 @@ def self.detect_from_url(url)
when %r{^https?://(.+?\.)?googlecode\.com/svn},
%r{^https?://svn\.},
%r{^svn://},
- %r{^https?://(.+?\.)?sourceforge\.net/svnroot/},
%r{^svn\+http://},
- %r{^http://svn\.apache\.org/repos/}
+ %r{^http://svn\.a... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/formula.rb | @@ -1271,7 +1271,7 @@ def outdated_kegs(fetch_head: false)
end
if current_version ||
- (latest_head_version && !head_version_outdated?(latest_head_version, fetch_head: fetch_head))
+ ((head_version = latest_head_version) && !head_version_outdated?(head_version, fetch_head: fetch_head))
... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/formula_installer.rb | @@ -537,7 +537,7 @@ def expand_requirements
if req.prune_from_option?(build) ||
req.satisfied?(env: env, cc: cc, build_bottle: @build_bottle, bottle_arch: bottle_arch) ||
((req.build? || req.test?) && !keep_build_test) ||
- (formula_deps_map.key?(dependent.name) && formula_dep... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/keg.rb | @@ -494,13 +494,15 @@ def link(**options)
%r{^guile/},
*SHARE_PATHS
:mkpath
- else :link
+ else
+ :link
end
end
link_dir("lib", **options) do |relative_path|
case relative_path.to_s
- when "charset.alias" then :skip_file
+ when "chars... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/os/mac/xcode.rb | @@ -189,24 +189,20 @@ def detect_version_from_clang_version
# installed CLT version. This is useful as they are packaged
# simultaneously so workarounds need to apply to both based on their
# comparable version.
- # rubocop:disable Lint/DuplicateBranch
- latest_stable = "12.0"
... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/rubocops/homepage.rb | @@ -22,18 +22,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
problem "The homepage should start with http or https (URL is #{homepage})."
end
- # rubocop:disable Lint/DuplicateBranch
case homepage
- # Check for http:// GitHub homepage URL... | true |
Other | Homebrew | brew | 1b732ec7b2952b47c0c80e6cde3f3b61f2cbb669.json | Fix RuboCop offenses. | Library/Homebrew/version.rb | @@ -516,16 +516,16 @@ def <=>(other)
l += 1
r += 1
next
- elsif a.numeric? == b.numeric?
- return a <=> b
- elsif a.numeric?
+ elsif a.numeric? && !b.numeric?
return 1 if a > NULL_TOKEN
l += 1
- elsif b.numeric?
+ elsif !a.numeric? && b.nume... | true |
Other | Homebrew | brew | 1e07b77f49e6893eccdcb9096acd445aa0351f36.json | bintray: fix typo in it comment
non-existant -> non-existent | Library/Homebrew/test/bintray_spec.rb | @@ -17,7 +17,7 @@
expect(hash).to eq("449de5ea35d0e9431f367f1bb34392e450f6853cdccdc6bd04e6ad6471904ddb")
end
- it "fails on a non-existant file" do
+ it "fails on a non-existent file" do
hash = bintray.remote_checksum(repo: "bottles", remote_file: "my-fake-bottle-1.0.snow_hyena.tar.gz")
... | false |
Other | Homebrew | brew | e14ce96f224b2d330280e913908ea63c19d988b0.json | pr-pull: skip bottles for CI-syntax-only PRs | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -285,8 +285,9 @@ def cherry_pick_pr!(user, repo, pr, args:, path: ".")
Utils::Git.cherry_pick!(path, "--ff", "--allow-empty", *commits, verbose: args.verbose?, resolve: args.resolve?)
end
- def formulae_need_bottles?(tap, original_commit, args:)
+ def formulae_need_bottles?(tap, original_commit, user, re... | true |
Other | Homebrew | brew | e14ce96f224b2d330280e913908ea63c19d988b0.json | pr-pull: skip bottles for CI-syntax-only PRs | Library/Homebrew/utils/github.rb | @@ -779,4 +779,9 @@ def pull_request_commits(user, repo, pr, per_page: 100)
end
end
end
+
+ def pull_request_labels(user, repo, pr)
+ pr_data = open_api(url_to("repos", user, repo, "pulls", pr))
+ pr_data["labels"].map { |label| label["name"] }
+ end
end | true |
Other | Homebrew | brew | dd1830e1e3b67e53d2e3a9e67fd1a5e613579262.json | info: restore printing of statistics | Library/Homebrew/cmd/info.rb | @@ -90,20 +90,23 @@ def info
raise FormulaOrCaskUnspecifiedError if args.no_named?
exec_browser(*args.named.to_formulae_and_casks.map { |f| github_info(f) })
+ elsif args.no_named?
+ print_statistics
else
print_info(args: args)
end
end
+ def print_statistics
+ return un... | false |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/.rubocop.yml | @@ -297,15 +297,9 @@ Sorbet/ConstantsFromStrings:
Style/AccessModifierDeclarations:
Enabled: false
-# don't group nicely documented or private attr_readers
+# Conflicts with type signatures on `attr_*`s.
Style/AccessorGrouping:
- Exclude:
- - 'Homebrew/formula.rb'
- - 'Homebrew/formulary.rb'
- - 'Homeb... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/bintray.rb | @@ -8,13 +8,16 @@
#
# @api private
class Bintray
+ extend T::Sig
+
include Context
API_URL = "https://api.bintray.com"
class Error < RuntimeError
end
+ sig { returns(String) }
def inspect
"#<Bintray: org=#{@bintray_org}>"
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/abstract_artifact.rb | @@ -7,6 +7,8 @@ module Artifact
#
# @api private
class AbstractArtifact
+ extend T::Sig
+
include Comparable
extend Predicable
@@ -132,6 +134,7 @@ def config
cask.config
end
+ sig { returns(String) }
def to_s
"#{summarize} (#{self.class.english_... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/abstract_uninstall.rb | @@ -15,6 +15,8 @@ module Artifact
#
# @api private
class AbstractUninstall < AbstractArtifact
+ extend T::Sig
+
ORDERED_DIRECTIVES = [
:early_script,
:launchctl,
@@ -53,6 +55,7 @@ def to_h
directives.to_h
end
+ sig { returns(String) }
def summar... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/artifact.rb | @@ -12,6 +12,9 @@ module Artifact
#
# @api private
class Artifact < Moved
+ extend T::Sig
+
+ sig { returns(String) }
def self.english_name
"Generic Artifact"
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/mdimporter.rb | @@ -9,6 +9,9 @@ module Artifact
#
# @api private
class Mdimporter < Moved
+ extend T::Sig
+
+ sig { returns(String) }
def self.english_name
"Spotlight metadata importer"
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/moved.rb | @@ -9,6 +9,9 @@ module Artifact
#
# @api private
class Moved < Relocated
+ extend T::Sig
+
+ sig { returns(String) }
def self.english_description
"#{english_name}s"
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/prefpane.rb | @@ -9,6 +9,9 @@ module Artifact
#
# @api private
class Prefpane < Moved
+ extend T::Sig
+
+ sig { returns(String) }
def self.english_name
"Preference Pane"
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/qlplugin.rb | @@ -9,6 +9,9 @@ module Artifact
#
# @api private
class Qlplugin < Moved
+ extend T::Sig
+
+ sig { returns(String) }
def self.english_name
"QuickLook Plugin"
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/relocated.rb | @@ -12,6 +12,8 @@ module Artifact
#
# @api private
class Relocated < AbstractArtifact
+ extend T::Sig
+
def self.from_args(cask, *args)
source_string, target_hash = args
@@ -49,6 +51,7 @@ def to_a
end
end
+ sig { returns(String) }
def summarize
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/stage_only.rb | @@ -9,16 +9,20 @@ module Artifact
#
# @api private
class StageOnly < AbstractArtifact
+ extend T::Sig
+
def self.from_args(cask, *args)
raise CaskInvalidError.new(cask.token, "'stage_only' takes only a single argument: true") if args != [true]
new(cask)
end
+ ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/suite.rb | @@ -9,10 +9,14 @@ module Artifact
#
# @api private
class Suite < Moved
+ extend T::Sig
+
+ sig { returns(String) }
def self.english_name
"App Suite"
end
+ sig { returns(Symbol) }
def self.dirmethod
:appdir
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/artifact/symlinked.rb | @@ -9,10 +9,14 @@ module Artifact
#
# @api private
class Symlinked < Relocated
+ extend T::Sig
+
+ sig { returns(String) }
def self.link_type_english_name
"Symlink"
end
+ sig { returns(String) }
def self.english_description
"#{english_name} #{link_t... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/audit.rb | @@ -13,6 +13,8 @@ module Cask
#
# @api private
class Audit
+ extend T::Sig
+
extend Predicable
attr_reader :cask, :download
@@ -117,6 +119,7 @@ def result
end
end
+ sig { returns(String) }
def summary
summary = ["audit for #{cask}: #{result}"]
@@ -416,6 +419,7 @@ d... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cask.rb | @@ -12,6 +12,8 @@ module Cask
#
# @api private
class Cask
+ extend T::Sig
+
extend Enumerable
extend Forwardable
extend Searchable
@@ -64,6 +66,7 @@ def config=(config)
define_method(method_name) { |&block| @dsl.send(method_name, &block) }
end
+ sig { returns(T::Array[[String... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cask_loader.rb | @@ -90,6 +90,8 @@ def cask(header_token, **options, &block)
# Loads a cask from a URI.
class FromURILoader < FromPathLoader
+ extend T::Sig
+
def self.can_load?(ref)
uri_regex = ::URI::DEFAULT_PARSER.make_regexp
return false unless ref.to_s.match?(Regexp.new("\\A#{uri_regex.sou... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd.rb | @@ -38,6 +38,8 @@ module Cask
#
# @api private
class Cmd
+ extend T::Sig
+
include Context
ALIASES = {
@@ -61,6 +63,7 @@ class Cmd
Cmd::Upgrade => "brew upgrade --cask",
}.freeze
+ sig { returns(String) }
def self.description
max_command_length = Cmd.commands.map(&... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/--cache.rb | @@ -7,18 +7,24 @@ class Cmd
#
# @api private
class Cache < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(T.any(Integer, Symbol))) }
def self.min_named
:cask
end
+ sig { returns(String) }
def self.description
"Display the file ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/abstract_command.rb | @@ -9,16 +9,22 @@ class Cmd
#
# @api private
class AbstractCommand
+ extend T::Sig
+ extend T::Helpers
+
include Homebrew::Search
+ sig { returns(T.nilable(T.any(Integer, Symbol))) }
def self.min_named
nil
end
+ sig { returns(T.nilable(Integer)) }
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/abstract_internal_command.rb | @@ -7,10 +7,14 @@ class Cmd
#
# @api private
class AbstractInternalCommand < AbstractCommand
+ extend T::Sig
+
+ sig { returns(String) }
def self.command_name
super.sub(/^internal_/i, "_")
end
+ sig { returns(T::Boolean) }
def self.visible?
false
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/audit.rb | @@ -9,6 +9,9 @@ class Cmd
#
# @api private
class Audit < AbstractCommand
+ extend T::Sig
+
+ sig { returns(String) }
def self.description
<<~EOS
Check <cask> for Homebrew coding style violations. This should be run before
@@ -37,6 +40,7 @@ def self.parser
end... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/cat.rb | @@ -7,14 +7,19 @@ class Cmd
#
# @api private
class Cat < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(T.any(Integer, Symbol))) }
def self.min_named
:cask
end
+ sig { returns(String) }
def self.description
"Dump raw source of ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/create.rb | @@ -7,14 +7,19 @@ class Cmd
#
# @api private
class Create < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(T.any(Integer, Symbol))) }
def self.min_named
:cask
end
+ sig { override.returns(T.nilable(Integer)) }
def self.max_named
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/doctor.rb | @@ -7,14 +7,19 @@ class Cmd
#
# @api private
class Doctor < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(Integer)) }
def self.max_named
0
end
+ sig { returns(String) }
def self.description
"Checks for configuration issues."
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/edit.rb | @@ -7,14 +7,19 @@ class Cmd
#
# @api private
class Edit < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(T.any(Integer, Symbol))) }
def self.min_named
:cask
end
+ sig { override.returns(T.nilable(Integer)) }
def self.max_named
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/fetch.rb | @@ -7,6 +7,9 @@ class Cmd
#
# @api private
class Fetch < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(T.any(Integer, Symbol))) }
def self.min_named
:cask
end
@@ -18,10 +21,12 @@ def self.parser
end
end
+ sig { returns(String)... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/help.rb | @@ -7,14 +7,19 @@ class Cmd
#
# @api private
class Help < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(Integer)) }
def self.max_named
1
end
+ sig { returns(String) }
def self.description
"Print help for `cask` commands."
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/home.rb | @@ -7,10 +7,14 @@ class Cmd
#
# @api private
class Home < AbstractCommand
+ extend T::Sig
+
+ sig { returns(String) }
def self.description
"Opens the homepage of the given <cask>. If no cask is given, opens the Homebrew homepage."
end
+ sig { void }
def run
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/info.rb | @@ -9,10 +9,14 @@ class Cmd
#
# @api private
class Info < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(T.any(Integer, Symbol))) }
def self.min_named
:cask
end
+ sig { returns(String) }
def self.description
"Displays informati... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/install.rb | @@ -7,10 +7,14 @@ class Cmd
#
# @api private
class Install < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(T.any(Integer, Symbol))) }
def self.min_named
:cask
end
+ sig { returns(String) }
def self.description
"Installs the gi... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/internal_help.rb | @@ -7,14 +7,19 @@ class Cmd
#
# @api private
class InternalHelp < AbstractInternalCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(Integer)) }
def self.max_named
0
end
+ sig { returns(String) }
def self.description
"Print help for unstab... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/internal_stanza.rb | @@ -9,6 +9,8 @@ class Cmd
#
# @api private
class InternalStanza < AbstractInternalCommand
+ extend T::Sig
+
# Syntax
#
# brew cask _stanza <stanza_name> [ --quiet ] [ --table | --yaml ] [ <cask_token> ... ]
@@ -24,14 +26,17 @@ class InternalStanza < AbstractInternalCommand
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/list.rb | @@ -9,6 +9,9 @@ class Cmd
#
# @api private
class List < AbstractCommand
+ extend T::Sig
+
+ sig { returns(String) }
def self.description
"Lists installed casks or the casks provided in the arguments."
end
@@ -26,6 +29,7 @@ def self.parser
end
end
+ ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/outdated.rb | @@ -7,6 +7,9 @@ class Cmd
#
# @api private
class Outdated < AbstractCommand
+ extend T::Sig
+
+ sig { returns(String) }
def self.description
"List the outdated installed casks."
end
@@ -20,6 +23,7 @@ def self.parser
end
end
+ sig { void }
def... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/reinstall.rb | @@ -7,10 +7,14 @@ class Cmd
#
# @api private
class Reinstall < Install
+ extend T::Sig
+
+ sig { returns(String) }
def self.description
"Reinstalls the given <cask>."
end
+ sig { void }
def run
self.class.reinstall_casks(
*casks, | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/style.rb | @@ -10,6 +10,9 @@ class Cmd
#
# @api private
class Style < AbstractCommand
+ extend T::Sig
+
+ sig { returns(String) }
def self.description
"Checks style of the given <cask> using RuboCop."
end
@@ -21,6 +24,7 @@ def self.parser
end
end
+ sig { void ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/uninstall.rb | @@ -7,10 +7,14 @@ class Cmd
#
# @api private
class Uninstall < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(T.any(Integer, Symbol))) }
def self.min_named
:cask
end
+ sig { returns(String) }
def self.description
"Uninstalls th... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/upgrade.rb | @@ -10,6 +10,9 @@ class Cmd
#
# @api private
class Upgrade < AbstractCommand
+ extend T::Sig
+
+ sig { returns(String) }
def self.description
"Upgrades all outdated casks or the specified casks."
end
@@ -36,6 +39,7 @@ def self.parser
end
end
+ sig {... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/cmd/zap.rb | @@ -7,10 +7,14 @@ class Cmd
#
# @api private
class Zap < AbstractCommand
+ extend T::Sig
+
+ sig { override.returns(T.nilable(T.any(Integer, Symbol))) }
def self.min_named
:cask
end
+ sig { returns(String) }
def self.description
<<~EOS
Za... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/denylist.rb | @@ -1,11 +1,14 @@
-# typed: true
+# typed: strict
# frozen_string_literal: true
module Cask
# List of casks which are not allowed in official taps.
#
# @api private
module Denylist
+ extend T::Sig
+
+ sig { params(name: String).returns(T.nilable(String)) }
def self.reason(name)
case na... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/dsl/version.rb | @@ -7,6 +7,8 @@ class DSL
#
# @api private
class Version < ::String
+ extend T::Sig
+
DIVIDERS = {
"." => :dots,
"-" => :hyphens,
@@ -62,6 +64,7 @@ def conversion_method_name(left_divider, right_divider)
attr_reader :raw_version
+ sig { params(raw_version: T.... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/exceptions.rb | @@ -11,12 +11,15 @@ class CaskError < RuntimeError; end
#
# @api private
class MultipleCaskErrors < CaskError
+ extend T::Sig
+
def initialize(errors)
super()
@errors = errors
end
+ sig { returns(String) }
def to_s
<<~EOS
Problems with multiple casks:
@@ -... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/installer.rb | @@ -18,6 +18,8 @@ module Cask
#
# @api private
class Installer
+ extend T::Sig
+
extend Predicable
# TODO: it is unwise for Cask::Staged to be a module, when we are
# dealing with both staged and unstaged casks here. This should
@@ -142,6 +144,7 @@ def uninstall_existing_cask
Ins... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/quarantine.rb | @@ -9,6 +9,8 @@ module Cask
#
# @api private
module Quarantine
+ extend T::Sig
+
module_function
QUARANTINE_ATTRIBUTE = "com.apple.quarantine"
@@ -25,6 +27,7 @@ def xattr
end
private :xattr
+ sig { returns(Symbol) }
def check_quarantine_support
odebug "Checking quarant... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cask/utils.rb | @@ -13,6 +13,8 @@ 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|
@@ -72,10 +74,12 @@ def self.gain_permissions(path, com... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/cli/args.rb | @@ -7,11 +7,14 @@
module Homebrew
module CLI
class Args < OpenStruct
+ extend T::Sig
+
attr_reader :options_only, :flags_only
# undefine tap to allow --tap argument
undef tap
+ sig { void }
def initialize
super()
@@ -131,6 +134,7 @@ def value(name)
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.