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 | 91893c42f87256582593d74c3cac536a2fc3c81d.json | Update RBI files for rubocop-performance. | Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.9.1.rbi | @@ -162,19 +162,21 @@ RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra
class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
- def flat_map_candidate?(param0 = T.unsafe(nil)); end
+ def chain_array_allocation?(param0 = T.u... | true |
Other | Homebrew | brew | 91893c42f87256582593d74c3cac536a2fc3c81d.json | Update RBI files for rubocop-performance. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -25753,14 +25753,6 @@ module Readline
def self.completion_quote_character(); end
end
-class Regexp::Expression::Base
- include ::RuboCop::Ext::RegexpParser::Expression::Base
-end
-
-class Regexp::Expression::CharacterSet
- include ::RuboCop::Ext::RegexpParser::Expression::CharacterSet
-end
-
class Requireme... | true |
Other | Homebrew | brew | fddd589bc3f38378500bea962c2805e9db2c79fe.json | Make more `require`s in `NamedArgs` lazy. | Library/Homebrew/cli/named_args.rb | @@ -3,12 +3,7 @@
require "delegate"
-require "cask/cask_loader"
require "cli/args"
-require "formula"
-require "formulary"
-require "keg"
-require "missing_formula"
module Homebrew
module CLI
@@ -19,6 +14,12 @@ class NamedArgs < Array
extend T::Sig
def initialize(*args, parent: Args.new, ove... | false |
Other | Homebrew | brew | 6e20d2758281a9f331edecc56b6dd4f8df86f277.json | Remove some unneeded `require`s. | Library/Homebrew/extend/os/linux/system_config.rb | @@ -1,7 +1,6 @@
# typed: true
# frozen_string_literal: true
-require "formula"
require "os/linux/glibc"
require "system_command"
@@ -48,7 +47,7 @@ def dump_verbose_config(out = $stdout)
out.puts "/usr/bin/gcc: #{host_gcc_version}"
out.puts "/usr/bin/ruby: #{host_ruby_version}" if RUBY_PATH != HOST... | true |
Other | Homebrew | brew | 6e20d2758281a9f331edecc56b6dd4f8df86f277.json | Remove some unneeded `require`s. | Library/Homebrew/uninstall.rb | @@ -2,7 +2,6 @@
# frozen_string_literal: true
require "keg"
-require "formula"
module Homebrew
# Helper module for uninstalling kegs. | true |
Other | Homebrew | brew | 2ad7f5317cb373e76fe3bb2c0a13b48a665b014a.json | Add signatures for `Fetch` module. | Library/Homebrew/fetch.rb | @@ -4,11 +4,16 @@
module Homebrew
# @api private
module Fetch
+ extend T::Sig
+
+ sig { params(f: Formula, args: CLI::Args).returns(T::Boolean) }
def fetch_bottle?(f, args:)
- return true if args.force_bottle? && f.bottle
- return false unless f.bottle && f.pour_bottle?
+ bottle = f.bot... | false |
Other | Homebrew | brew | 3541ede9275af4714dce0659723a69456c4643a0.json | Fix signature for `update_python_resources!`. | Library/Homebrew/utils/pypi.rb | @@ -122,9 +122,9 @@ def update_pypi_url(url, version)
package_name: T.nilable(String),
extra_packages: T.nilable(T::Array[String]),
exclude_packages: T.nilable(T::Array[String]),
- print_only: T::Boolean,
- silent: T::Boolean,
... | false |
Other | Homebrew | brew | 749199632b2e5824d6c5d09c7bc83b856c13d273.json | Add signatures for `dev-cmd/unbottled`. | Library/Homebrew/dev-cmd/unbottled.rb | @@ -33,11 +33,7 @@ def unbottled
Formulary.enable_factory_cache!
- @bottle_tag = if args.tag.present?
- args.tag.to_sym
- else
- Utils::Bottles.tag
- end
+ @bottle_tag = args.tag.presence&.to_sym || Utils::Bottles.tag
if args.named.blank?
ohai "Getting formulae..." | false |
Other | Homebrew | brew | a0d6f45bd7e6ab3911eaf20b3bf5a18147a7e595.json | Add signatures for `cmd/tap`. | Library/Homebrew/cmd/tap.rb | @@ -45,6 +45,7 @@ def tap_args
end
end
+ sig { void }
def tap
args = tap_args.parse
| false |
Other | Homebrew | brew | 1baf98ea69c0a33dea17174ddc0ea0e321771a6b.json | Add signatures for `cmd/--cache`. | Library/Homebrew/cmd/--cache.rb | @@ -35,6 +35,7 @@ def __cache_args
end
end
+ sig { void }
def __cache
args = __cache_args.parse
@@ -60,6 +61,7 @@ def __cache
end
end
+ sig { params(formula: Formula, args: CLI::Args).void }
def print_formula_cache(formula, args:)
if fetch_bottle?(formula, args: args)
puts... | false |
Other | Homebrew | brew | 580d915cb4e4b00298d9341ff27bc746cbc7cc16.json | Add type signatures for `Pathname` extensions. | Library/Homebrew/extend/pathname.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "resource"
@@ -7,15 +7,17 @@
module DiskUsageExtension
extend T::Sig
+ sig { returns(Integer) }
def disk_usage
- return @disk_usage if @disk_usage
+ return @disk_usage if defined?(@disk_usage)
compute_disk_us... | true |
Other | Homebrew | brew | 580d915cb4e4b00298d9341ff27bc746cbc7cc16.json | Add type signatures for `Pathname` extensions. | Library/Homebrew/extend/pathname.rbi | @@ -0,0 +1,19 @@
+# typed: strict
+
+module DiskUsageExtension
+ include Kernel
+
+ def exist?; end
+
+ def symlink?; end
+
+ def resolved_path; end
+end
+
+module ObserverPathnameExtension
+ include Kernel
+
+ def dirname; end
+
+ def basename; end
+end | true |
Other | Homebrew | brew | 580d915cb4e4b00298d9341ff27bc746cbc7cc16.json | Add type signatures for `Pathname` extensions. | Library/Homebrew/sorbet/rbi/upstream.rbi | @@ -16,6 +16,18 @@ class IO
def self.open(fd, mode='r', opt=nil, &blk); end
end
+class Pathname
+ # https://github.com/sorbet/sorbet/pull/3729
+ sig do
+ params(
+ owner: T.nilable(Integer),
+ group: T.nilable(Integer),
+ )
+ .returns(Integer)
+ end
+ def chown(owner, group); end
+end
+... | true |
Other | Homebrew | brew | 38ec7b684d27ada5df87e9cd42656de57587609a.json | Add note in `upstream.rbi`. | Library/Homebrew/sorbet/rbi/upstream.rbi | @@ -1,5 +1,8 @@
# typed: strict
+# This file contains temporary definitions for fixes that have
+# been submitted upstream to https://github.com/sorbet/sorbet.
+
class IO
# https://github.com/sorbet/sorbet/pull/3722
sig do | false |
Other | Homebrew | brew | 6b0671675758e90aaa2dcaa650a46eee324c9ced.json | bintray: add type signatures | Library/Homebrew/bintray.rb | @@ -11,6 +11,7 @@ class Bintray
extend T::Sig
include Context
+ include Utils::Curl
API_URL = "https://api.bintray.com"
@@ -22,6 +23,7 @@ def inspect
"#<Bintray: org=#{@bintray_org}>"
end
+ sig { params(org: T.nilable(String)).void }
def initialize(org: "homebrew")
@bintray_org = org
... | false |
Other | Homebrew | brew | 5309470f28631fdf03b10aa79c14bcb2358474f8.json | diagnostic: check all tap branches, not just core | Library/Homebrew/diagnostic.rb | @@ -566,20 +566,30 @@ def check_casktap_git_origin
examine_git_origin(cask_tap.path, cask_tap.remote)
end
- def check_coretap_git_branch
+ sig { returns(T.nilable(String)) }
+ def check_tap_git_branch
return if ENV["CI"]
+ return unless Utils::Git.available?
- c... | false |
Other | Homebrew | brew | f98736119b0abf668a1c49272e129d4207f74d90.json | global: fix default prefix | Library/Homebrew/global.rb | @@ -88,7 +88,7 @@ module Homebrew
class << self
attr_writer :failed, :raise_deprecation_exceptions, :auditing
- def Homebrew.default_prefix?(prefix = HOMEBREW_PREFIX)
+ def default_prefix?(prefix = HOMEBREW_PREFIX)
prefix.to_s == DEFAULT_PREFIX
end
| false |
Other | Homebrew | brew | 65bc39f952d5542e620d1711dd2337913c890f7a.json | HOMEBREW_PATCHELF_RB_WRITE: Move logic to test-bot | Library/Homebrew/dev-cmd/bottle.rb | @@ -84,8 +84,6 @@ def bottle_args
end
def bottle
- ENV["HOMEBREW_NO_PATCHELF_RB_WRITE"] = "1" unless ENV["HOMEBREW_PATCHELF_RB_WRITE"].present?
-
args = bottle_args.parse
return merge(args: args) if args.merge? | true |
Other | Homebrew | brew | 65bc39f952d5542e620d1711dd2337913c890f7a.json | HOMEBREW_PATCHELF_RB_WRITE: Move logic to test-bot | Library/Homebrew/os/linux/elf.rb | @@ -101,7 +101,7 @@ def interpreter
def patch!(interpreter: nil, rpath: nil)
return if interpreter.blank? && rpath.blank?
- if HOMEBREW_PATCHELF_RB_WRITE && ENV["HOMEBREW_NO_PATCHELF_RB_WRITE"].blank?
+ if HOMEBREW_PATCHELF_RB_WRITE
save_using_patchelf_rb interpreter, rpath
else
save_... | true |
Other | Homebrew | brew | 5a007a4ec6eed7df2c255e1175ff918fa1f1b00e.json | livecheck: expand #preprocess_url tests more | Library/Homebrew/test/livecheck/livecheck_spec.rb | @@ -156,6 +156,12 @@
describe "::preprocess_url" do
let(:github_git_url_with_extension) { "https://github.com/Homebrew/brew.git" }
+ it "returns the unmodified URL for an unparseable URL" do
+ # Modeled after the `head` URL in the `ncp` formula
+ expect(livecheck.preprocess_url(":something:cvs:@c... | false |
Other | Homebrew | brew | 3002c810be2981543a4732016c83b6e140e6e439.json | Improve ZSH completions handling
- Only display the completions caveats from the current shell (assuming
it's one of Bash, ZSH or Fish)
- If the completions location isn't in the ZSH `FPATH` then link to the
documentation explaining how to do so.
Fixes https://github.com/Homebrew/brew/issues/8984 | Library/Homebrew/caveats.rb | @@ -26,9 +26,20 @@ def caveats
f.build = build
end
caveats << keg_only_text
- caveats << function_completion_caveats(:bash)
- caveats << function_completion_caveats(:zsh)
- caveats << function_completion_caveats(:fish)
+
+ valid_shells = [:bash, :zsh, :fish].freeze
+ current_shell = Util... | true |
Other | Homebrew | brew | 3002c810be2981543a4732016c83b6e140e6e439.json | Improve ZSH completions handling
- Only display the completions caveats from the current shell (assuming
it's one of Bash, ZSH or Fish)
- If the completions location isn't in the ZSH `FPATH` then link to the
documentation explaining how to do so.
Fixes https://github.com/Homebrew/brew/issues/8984 | Library/Homebrew/test/caveats_spec.rb | @@ -188,6 +188,8 @@ def plist
before do
allow_any_instance_of(Pathname).to receive(:children).and_return([Pathname.new("child")])
allow_any_instance_of(Object).to receive(:which).with(any_args).and_return(Pathname.new("shell"))
+ allow(Utils::Shell).to receive(:preferred).and_return(nil)... | true |
Other | Homebrew | brew | 3002c810be2981543a4732016c83b6e140e6e439.json | Improve ZSH completions handling
- Only display the completions caveats from the current shell (assuming
it's one of Bash, ZSH or Fish)
- If the completions location isn't in the ZSH `FPATH` then link to the
documentation explaining how to do so.
Fixes https://github.com/Homebrew/brew/issues/8984 | bin/brew | @@ -62,7 +62,7 @@ HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library"
# Copy and export all HOMEBREW_* variables previously mentioned in
# manpage or used elsewhere by Homebrew.
-for VAR in BROWSER DISPLAY EDITOR NO_COLOR PATH
+for VAR in BROWSER DISPLAY EDITOR NO_COLOR PATH FPATH
do
# Skip if variable value is emp... | true |
Other | Homebrew | brew | 74fd700445c94b76a72fc67452fec934645e0389.json | livecheck: fix github & gitlab url processing
- support both `github.com/downloads/<owner>/<repo>` and
`github.s3.amazonaws.com/<owner>/<repo>` URL patterns
- support self-hosted GitLab installations (with project groups)
- support _well-known_ Gitea and Gogs instances | Library/Homebrew/livecheck/livecheck.rb | @@ -14,6 +14,17 @@ module Homebrew
module Livecheck
module_function
+ GITEA_INSTANCES = %w[
+ codeberg.org
+ gitea.com
+ opendev.org
+ tildegit.org
+ ].freeze
+
+ GOGS_INSTANCES = %w[
+ lolg.it
+ ].freeze
+
UNSTABLE_VERSION_KEYWORDS = %w[
alpha
beta
@@ -... | false |
Other | Homebrew | brew | 95bf529ad2bb6626ff4f5e8e084622e22a779a89.json | bottle merge: add support for linux cellar
The first attempt to build and pull a formula (hello) for linux in homebrew-core
resulted in a wrong cellar line being added to the formula's bottle block.
How to test/debug this, using the 4 bottles that where built for hello:
brew bottle --merge --debug hello--2.10_1.mojav... | Library/Homebrew/dev-cmd/bottle.rb | @@ -22,7 +22,9 @@
<% end %>
<% if cellar.is_a? Symbol %>
cellar :<%= cellar %>
- <% elsif ![Homebrew::DEFAULT_CELLAR, "/usr/local/Cellar"].include?(cellar) %>
+ <% elsif ![Homebrew::DEFAULT_MACOS_CELLAR,
+ Homebrew::DEFAULT_MACOS_ARM_CELLAR,
+ Homebrew::DEFAULT_LINUX_CEL... | true |
Other | Homebrew | brew | 95bf529ad2bb6626ff4f5e8e084622e22a779a89.json | bottle merge: add support for linux cellar
The first attempt to build and pull a formula (hello) for linux in homebrew-core
resulted in a wrong cellar line being added to the formula's bottle block.
How to test/debug this, using the 4 bottles that where built for hello:
brew bottle --merge --debug hello--2.10_1.mojav... | Library/Homebrew/global.rb | @@ -80,6 +80,9 @@ module Homebrew
DEFAULT_PREFIX ||= HOMEBREW_DEFAULT_PREFIX
DEFAULT_CELLAR = "#{DEFAULT_PREFIX}/Cellar"
+ DEFAULT_MACOS_CELLAR = "#{HOMEBREW_DEFAULT_PREFIX}/Cellar"
+ DEFAULT_MACOS_ARM_CELLAR = "#{HOMEBREW_MACOS_ARM_DEFAULT_PREFIX}/Cellar"
+ DEFAULT_LINUX_CELLAR = "#{HOMEBREW_LINUX_DEFAULT_P... | true |
Other | Homebrew | brew | 6f4d2a9dcd883a512d814e5588c37712fbdc9be5.json | brew.sh: remove trailing period. | Library/Homebrew/brew.sh | @@ -377,7 +377,7 @@ Your cURL executable: $(type -p $HOMEBREW_CURL)"
if [[ $(numeric "$major.$minor.$micro.$build") -lt $(numeric "$HOMEBREW_MINIMUM_GIT_VERSION") ]]
then
message="Please update your system Git.
-Minimum required version: ${HOMEBREW_MINIMUM_GIT_VERSION}.
+Minimum required version: ${HOMEBREW_... | false |
Other | Homebrew | brew | 135b5a3679a44ac0e1873f64c6ca0b28d747f508.json | dev-cmd/unbottled: add new command.
Add a new command to list formulae that aren't bottled for a given OS. | Library/Homebrew/dev-cmd/unbottled.rb | @@ -0,0 +1,166 @@
+# typed: true
+# frozen_string_literal: true
+
+require "cli/parser"
+require "formula"
+
+module Homebrew
+ extend T::Sig
+
+ module_function
+
+ sig { returns(CLI::Parser) }
+ def unbottled_args
+ Homebrew::CLI::Parser.new do
+ usage_banner <<~EOS
+ `unbottled` [<formula>]
+
+ ... | true |
Other | Homebrew | brew | 135b5a3679a44ac0e1873f64c6ca0b28d747f508.json | dev-cmd/unbottled: add new command.
Add a new command to list formulae that aren't bottled for a given OS. | Library/Homebrew/test/dev-cmd/unbottled_spec.rb | @@ -0,0 +1,8 @@
+# typed: false
+# frozen_string_literal: true
+
+require "cmd/shared_examples/args_parse"
+
+describe "Homebrew.unbottled_args" do
+ it_behaves_like "parseable arguments"
+end | true |
Other | Homebrew | brew | 135b5a3679a44ac0e1873f64c6ca0b28d747f508.json | dev-cmd/unbottled: add new command.
Add a new command to list formulae that aren't bottled for a given OS. | completions/internal_commands_list.txt | @@ -87,6 +87,7 @@ tc
test
tests
typecheck
+unbottled
uninstal
uninstall
unlink | true |
Other | Homebrew | brew | 135b5a3679a44ac0e1873f64c6ca0b28d747f508.json | dev-cmd/unbottled: add new command.
Add a new command to list formulae that aren't bottled for a given OS. | docs/Manpage.md | @@ -1278,6 +1278,17 @@ Check for typechecking errors using Sorbet.
* `--ignore`:
Ignores input files that contain the given string in their paths (relative to the input path passed to Sorbet).
+### `unbottled` [*`formula`*]
+
+Outputs the unbottled dependents of formulae.
+
+* `--tag`:
+ Use the specified bottle... | true |
Other | Homebrew | brew | 135b5a3679a44ac0e1873f64c6ca0b28d747f508.json | dev-cmd/unbottled: add new command.
Add a new command to list formulae that aren't bottled for a given OS. | manpages/brew.1 | @@ -1768,6 +1768,21 @@ Typecheck a single file\.
\fB\-\-ignore\fR
Ignores input files that contain the given string in their paths (relative to the input path passed to Sorbet)\.
.
+.SS "\fBunbottled\fR [\fIformula\fR]"
+Outputs the unbottled dependents of formulae\.
+.
+.TP
+\fB\-\-tag\fR
+Use the specified bottle ... | true |
Other | Homebrew | brew | 2aecfe60fc8fd42c01a0b46b3ad15246b740a131.json | Update logic that handles HOMEBREW_GIT_PATH. | Library/Homebrew/brew.sh | @@ -351,7 +351,7 @@ else
if [[ $(numeric "${curl_name_and_version##* }") -lt $(numeric "$HOMEBREW_MINIMUM_CURL_VERSION") ]]
then
message="Please update your system cURL.
-Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION}.
+Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION}
Your cURL versi... | true |
Other | Homebrew | brew | 2aecfe60fc8fd42c01a0b46b3ad15246b740a131.json | Update logic that handles HOMEBREW_GIT_PATH. | Library/Homebrew/cmd/update.sh | @@ -373,7 +373,7 @@ EOS
! -x "$HOMEBREW_PREFIX/opt/curl/bin/curl" ]]
then
# we cannot install a Homebrew cURL if homebrew/core is unavailable.
- if [[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && ! brew install curl
+ if [[ ! -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] || ! br... | true |
Other | Homebrew | brew | 677eb2ef28007bbb2c4ad501be67c65341c733f4.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -5494,103 +5494,6 @@ module Cask::Cache
extend ::T::Private::Methods::SingletonMethodHooks
end
-class Cask::Cask
- def app(&block); end
-
- def appcast(&block); end
-
- def appdir(&block); end
-
- def artifact(&block); end
-
- def artifacts(&block); end
-
- def audio_unit_plugin(&block); end
-
- def aut... | false |
Other | Homebrew | brew | 1690f064a23c74848dd0dd1b989d0babe6991afa.json | Add types for `Formula`. | Library/Homebrew/PATH.rb | @@ -10,7 +10,7 @@ class PATH
include Enumerable
extend Forwardable
- def_delegator :@paths, :each
+ delegate each: :@paths
# FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed.
# rubocop:disable Style/MutableConstant | true |
Other | Homebrew | brew | 1690f064a23c74848dd0dd1b989d0babe6991afa.json | Add types for `Formula`. | Library/Homebrew/formula.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cache_store"
@@ -124,6 +124,7 @@ class Formula
# The currently active {SoftwareSpec}.
# @see #determine_active_spec
+ sig { returns(SoftwareSpec) }
attr_reader :active_spec
protected :active_spec
@@ -939,6 +940,7 ... | true |
Other | Homebrew | brew | 1690f064a23c74848dd0dd1b989d0babe6991afa.json | Add types for `Formula`. | Library/Homebrew/resource.rb | @@ -12,6 +12,8 @@
#
# @api private
class Resource
+ extend T::Sig
+
include Context
include FileUtils
@@ -221,8 +223,8 @@ def detect_version(val)
# A resource containing a Go package.
class Go < Resource
- def stage(target)
- super(target/name)
+ def stage(target, &block)
+ super(tar... | true |
Other | Homebrew | brew | 1690f064a23c74848dd0dd1b989d0babe6991afa.json | Add types for `Formula`. | Library/Homebrew/software_spec.rb | @@ -29,7 +29,9 @@ class SoftwareSpec
def_delegators :@resource, :stage, :fetch, :verify_download_integrity, :source_modified_time, :download_name,
:cached_download, :clear_cache, :checksum, :mirrors, :specs, :using, :version, :mirror,
- :downloader, *Checksum::TYPES
+ ... | true |
Other | Homebrew | brew | 1690f064a23c74848dd0dd1b989d0babe6991afa.json | Add types for `Formula`. | Library/Homebrew/sorbet/plugins/attr_rw.rb | @@ -0,0 +1,13 @@
+# typed: strict
+# frozen_string_literal: true
+
+source = ARGV[5]
+
+source.scan(/:([^\s,]+)/).flatten.each do |method|
+ puts <<~RUBY
+ # typed: strict
+
+ sig { params(arg: T.untyped).returns(T.untyped) }
+ def #{method}(arg = T.unsafe(nil)); end
+ RUBY
+end | true |
Other | Homebrew | brew | 1690f064a23c74848dd0dd1b989d0babe6991afa.json | Add types for `Formula`. | Library/Homebrew/sorbet/plugins/def_delegator.rb | @@ -0,0 +1,17 @@
+# typed: strict
+# frozen_string_literal: true
+
+source = ARGV[5]
+
+match = source.match(/\s*def_delegator\s+.*:(?<method>[^:]+)\s*\Z/m)
+
+raise if match.nil?
+
+method = match[:method]
+
+puts <<~RUBY
+ # typed: strict
+
+ sig {params(arg0: T.untyped, blk: T.untyped).returns(T.untyped)}
+ def #... | true |
Other | Homebrew | brew | 1690f064a23c74848dd0dd1b989d0babe6991afa.json | Add types for `Formula`. | Library/Homebrew/sorbet/plugins/def_delegators.rb | @@ -0,0 +1,17 @@
+# typed: strict
+# frozen_string_literal: true
+
+source = ARGV[5]
+
+symbols = source.scan(/:[^\s,]+/)
+
+_, *methods = symbols.map { |s| s.delete_prefix(":") }
+
+methods.each do |method|
+ puts <<~RUBY
+ # typed: strict
+
+ sig {params(arg0: T.untyped, blk: T.untyped).returns(T.untyped)}
+ ... | true |
Other | Homebrew | brew | 1690f064a23c74848dd0dd1b989d0babe6991afa.json | Add types for `Formula`. | Library/Homebrew/sorbet/plugins/delegate.rb | @@ -15,7 +15,7 @@
puts <<~RUBY
# typed: strict
- sig {params(arg0: T.untyped).returns(T.untyped)}
- def #{method}(*arg0); end
+ sig {params(arg0: T.untyped, blk: T.untyped).returns(T.untyped)}
+ def #{method}(*arg0, &blk); end
RUBY
end | true |
Other | Homebrew | brew | 1690f064a23c74848dd0dd1b989d0babe6991afa.json | Add types for `Formula`. | Library/Homebrew/sorbet/rbi/upstream.rbi | @@ -9,3 +9,48 @@ class Pathname
sig { params(with_directory: T::Boolean).returns(T::Array[Pathname]) }
def children(with_directory = true); end
end
+
+module FileUtils
+ # https://github.com/sorbet/sorbet/pull/3730
+ module_function
+
+ sig do
+ params(
+ src: T.untyped,
+ dest: T.untyped,
+ ... | true |
Other | Homebrew | brew | 1690f064a23c74848dd0dd1b989d0babe6991afa.json | Add types for `Formula`. | Library/Homebrew/sorbet/triggers.yml | @@ -4,4 +4,7 @@ ruby_extra_args:
triggers:
using: sorbet/plugins/using.rb
attr_predicate: sorbet/plugins/attr_predicate.rb
+ attr_rw: sorbet/plugins/attr_rw.rb
+ def_delegator: sorbet/plugins/def_delegator.rb
+ def_delegators: sorbet/plugins/def_delegators.rb
delegate: sorbet/plugins/delegate.rb | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cask/artifact/prefpane.rb | @@ -1,4 +1,4 @@
-# typed: true
+# typed: strict
# frozen_string_literal: true
require "cask/artifact/moved" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cask/artifact/suite.rb | @@ -1,4 +1,4 @@
-# typed: true
+# typed: strict
# frozen_string_literal: true
require "cask/artifact/moved" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cask/cmd/abstract_internal_command.rb | @@ -1,4 +1,4 @@
-# typed: true
+# typed: strict
# frozen_string_literal: true
module Cask | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cask/cmd/cat.rb | @@ -1,4 +1,4 @@
-# typed: true
+# typed: strict
# frozen_string_literal: true
module Cask | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cask/cmd/internal_help.rb | @@ -1,4 +1,4 @@
-# typed: true
+# typed: strict
# frozen_string_literal: true
module Cask | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/--cellar.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/--prefix.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/--repository.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/--version.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/analytics.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/autoremove.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/cleanup.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cleanup" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/config.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "system_config" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/gist-logs.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/leaves.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/link.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "ostruct" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/migrate.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "migrator" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/missing.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/pin.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/postinstall.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "sandbox" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/readall.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "readall" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/switch.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/tap.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/unlink.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "ostruct" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/unpin.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/cmd/untap.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/compat/language/haskell.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
module Language | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/bump-revision.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/bump.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/command.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "commands" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/dispatch-build-bottle.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/diy.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/edit.rb | @@ -1,4 +1,4 @@
-# typed: true
+# typed: strict
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/formula.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/install-bundler-gems.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "formula" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/linkage.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cache_store" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/livecheck.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/mirror.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "bintray" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/release-notes.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/style.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "json" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/update-license-data.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/dev-cmd/update-python-resources.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "cli/parser" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/extend/os/linux/requirements/xcode_requirement.rb | @@ -1,9 +1,12 @@
-# typed: false
+# typed: strict
# frozen_string_literal: true
require "requirement"
class XcodeRequirement < Requirement
+ extend T::Sig
+
+ sig { returns(T::Boolean) }
def xcode_installed_version
true
end | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/extend/os/mac/extend/ENV/shared.rb | @@ -1,4 +1,4 @@
-# typed: true
+# typed: strict
# frozen_string_literal: true
module SharedEnvExtension | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/extend/os/requirements/xcode_requirement.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: strict
# frozen_string_literal: true
require "extend/os/linux/requirements/xcode_requirement" if OS.linux? | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/formula_text_auditor.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
module Homebrew | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/language/node.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
module Language | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/requirement.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "dependable" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/requirements/linux_requirement.rb | @@ -1,4 +1,4 @@
-# typed: true
+# typed: strict
# frozen_string_literal: true
# A requirement on Linux. | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/requirements/xcode_requirement.rb | @@ -20,6 +20,7 @@ def initialize(tags = [])
super(tags)
end
+ sig { returns(T::Boolean) }
def xcode_installed_version
return false unless MacOS::Xcode.installed?
return true unless @version | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/resource.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "download_strategy" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/resource_auditor.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
module Homebrew | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/rubocops/cask/extend/string.rb | @@ -1,4 +1,4 @@
-# typed: true
+# typed: strict
# frozen_string_literal: true
# Utility method extensions for String. | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/system_command.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "open3" | true |
Other | Homebrew | brew | 5be4c9b5e0986c994fd1b0d81b117b48f317d8ee.json | Upgrade `typed` sigils. | Library/Homebrew/test/support/helper/cmd/brew-verify-formula-undefined.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: strict
# frozen_string_literal: true
require "cli/parser" | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.