From ced4a3a91fea0ef600b581a40b22851e786199e0 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Mon, 14 Oct 2024 10:50:57 -0700 Subject: [PATCH 1/2] Migrate Parlour extensions to Tapioca compilers --- Library/.rubocop.yml | 1 - Library/Homebrew/.parlour | 10 - Library/Homebrew/Gemfile | 1 - Library/Homebrew/Gemfile.lock | 9 - Library/Homebrew/attrable.rb | 4 + .../cask/artifact/abstract_artifact.rb | 1 - Library/Homebrew/cask/url.rb | 8 +- Library/Homebrew/dependency.rb | 1 - Library/Homebrew/dev-cmd/typecheck.rb | 1 - Library/Homebrew/download_strategy.rb | 1 - .../Homebrew/rubocops/cask/stanza_order.rb | 1 - Library/Homebrew/rubocops/cask/url.rb | 1 - Library/Homebrew/sorbet/parlour.rb | 43 - Library/Homebrew/sorbet/parlour/attr.rb | 162 - .../sorbet/rbi/dsl/arch_requirement.rbi | 8 + Library/Homebrew/sorbet/rbi/dsl/bottle.rbi | 20 + .../sorbet/rbi/dsl/bottle_specification.rbi | 11 + .../Homebrew/sorbet/rbi/dsl/cask/audit.rbi | 23 + Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi | 11 + Library/Homebrew/sorbet/rbi/dsl/cask/dsl.rbi | 23 + .../Homebrew/sorbet/rbi/dsl/cask/dsl/base.rbi | 29 + .../sorbet/rbi/dsl/cask/dsl/caveats.rbi | 11 + .../sorbet/rbi/dsl/cask/dsl/postflight.rbi | 8 + .../sorbet/rbi/dsl/cask/dsl/preflight.rbi | 8 + .../rbi/dsl/cask/dsl/uninstall_postflight.rbi | 8 + .../rbi/dsl/cask/dsl/uninstall_preflight.rbi | 8 + .../sorbet/rbi/dsl/cask/installer.rbi | 47 + .../Homebrew/sorbet/rbi/dsl/cask/url/dsl.rbi | 17 + Library/Homebrew/sorbet/rbi/dsl/caveats.rbi | 14 + Library/Homebrew/sorbet/rbi/dsl/checksum.rbi | 20 + .../sorbet/rbi/dsl/codesign_requirement.rbi | 8 + Library/Homebrew/sorbet/rbi/dsl/debrew.rbi | 13 + .../sorbet/rbi/dsl/external_patch.rbi | 29 + Library/Homebrew/sorbet/rbi/dsl/formula.rbi | 154 + .../sorbet/rbi/dsl/formula_installer.rbi | 56 + .../sorbet/rbi/dsl/head_software_spec.rbi | 8 + .../sorbet/rbi/dsl/homebrew/cleanup.rbi | 17 + .../livecheck/strategy/extract_plist/item.rbi | 14 + .../livecheck/strategy/sparkle/item.rbi | 17 + .../sorbet/rbi/dsl/homebrew/service.rbi | 35 + Library/Homebrew/sorbet/rbi/dsl/keg.rbi | 41 + .../sorbet/rbi/dsl/linux_requirement.rbi | 8 + Library/Homebrew/sorbet/rbi/dsl/livecheck.rbi | 8 + .../sorbet/rbi/dsl/mac_os_requirement.rbi | 8 + .../Homebrew/sorbet/rbi/dsl/mach_o_shim.rbi | 11 + Library/Homebrew/sorbet/rbi/dsl/path.rbi | 11 + .../Homebrew/sorbet/rbi/dsl/pkg_version.rbi | 23 + .../Homebrew/sorbet/rbi/dsl/requirement.rbi | 19 + .../sorbet/rbi/dsl/resource_stage_context.rbi | 29 + .../rbi/dsl/rubo_cop/cask/ast/cask_block.rbi | 11 + .../rbi/dsl/rubo_cop/cask/ast/stanza.rbi | 23 + .../dsl/rubo_cop/cop/cask/on_desc_stanza.rbi | 11 + .../rubo_cop/cop/cask/on_homepage_stanza.rbi | 11 + .../cop/cask/on_system_conditionals.rbi | 14 + .../dsl/rubo_cop/cop/cask/on_url_stanza.rbi | 11 + .../dsl/rubo_cop/cop/cask/stanza_grouping.rbi | 14 + .../rbi/dsl/rubo_cop/cop/cask/variables.rbi | 3 + .../Homebrew/sorbet/rbi/dsl/software_spec.rbi | 53 + .../sorbet/rbi/dsl/system_command.rbi | 20 + .../sorbet/rbi/dsl/utils/ast/formula_ast.rbi | 11 + .../sorbet/rbi/dsl/xcode_requirement.rbi | 8 + .../sorbet/rbi/gems/parlour@9.0.0.rbi | 3054 ----------------- Library/Homebrew/sorbet/rbi/parlour.rbi | 420 --- .../sorbet/tapioca/compilers/attrables.rb | 55 + .../sorbet/tapioca/compilers/forwardables.rb | 79 + Library/Homebrew/sorbet/tapioca/config.yml | 2 - Library/Homebrew/sorbet/tapioca/utils.rb | 23 + .../helper/cmd/brew-verify-undefined.rb | 1 - .../Homebrew/vendor/bundle/bundler/setup.rb | 11 +- docs/Typechecking.md | 1 - 70 files changed, 1131 insertions(+), 3724 deletions(-) delete mode 100644 Library/Homebrew/.parlour delete mode 100644 Library/Homebrew/sorbet/parlour.rb delete mode 100644 Library/Homebrew/sorbet/parlour/attr.rb create mode 100644 Library/Homebrew/sorbet/rbi/dsl/arch_requirement.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/bottle.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/bottle_specification.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/audit.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/dsl.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/dsl/base.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/dsl/caveats.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/dsl/postflight.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/dsl/preflight.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/dsl/uninstall_postflight.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/dsl/uninstall_preflight.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/installer.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/cask/url/dsl.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/caveats.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/checksum.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/codesign_requirement.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/debrew.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/external_patch.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/formula.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/formula_installer.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/head_software_spec.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/homebrew/cleanup.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/homebrew/livecheck/strategy/extract_plist/item.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/homebrew/livecheck/strategy/sparkle/item.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/homebrew/service.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/keg.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/linux_requirement.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/livecheck.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/mac_os_requirement.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/mach_o_shim.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/path.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/pkg_version.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/requirement.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/resource_stage_context.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cask/ast/cask_block.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cask/ast/stanza.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_desc_stanza.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_homepage_stanza.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_system_conditionals.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_url_stanza.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/stanza_grouping.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/software_spec.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/system_command.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/utils/ast/formula_ast.rbi create mode 100644 Library/Homebrew/sorbet/rbi/dsl/xcode_requirement.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/gems/parlour@9.0.0.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/parlour.rbi create mode 100644 Library/Homebrew/sorbet/tapioca/compilers/attrables.rb create mode 100644 Library/Homebrew/sorbet/tapioca/compilers/forwardables.rb create mode 100644 Library/Homebrew/sorbet/tapioca/utils.rb diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index e8227c7e7685c..f125134fb9652 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -18,7 +18,6 @@ AllCops: - "**/*.rbi" Exclude: - "Homebrew/sorbet/rbi/{dsl,gems}/**/*.rbi" - - "Homebrew/sorbet/rbi/parlour.rbi" - "Homebrew/bin/*" - "Homebrew/vendor/**/*" - "Taps/*/*/vendor/**/*" diff --git a/Library/Homebrew/.parlour b/Library/Homebrew/.parlour deleted file mode 100644 index 1fe16333dc4e2..0000000000000 --- a/Library/Homebrew/.parlour +++ /dev/null @@ -1,10 +0,0 @@ -parser: false - -output_file: - rbi: sorbet/rbi/parlour.rbi - -relative_requires: - - sorbet/parlour.rb - -plugins: - Attr: {} diff --git a/Library/Homebrew/Gemfile b/Library/Homebrew/Gemfile index 7849b80fc3fd5..3bcd332f44923 100644 --- a/Library/Homebrew/Gemfile +++ b/Library/Homebrew/Gemfile @@ -62,7 +62,6 @@ group :tests, optional: true do end group :typecheck, optional: true do gem "method_source", require: false - gem "parlour", require: false gem "sorbet-static-and-runtime", require: false gem "spoom", require: false gem "tapioca", require: false diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 7c80c0ba0013c..d70523d519234 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -7,8 +7,6 @@ GEM bigdecimal (3.1.8) bindata (2.5.0) coderay (1.1.3) - commander (5.0.0) - highline (~> 3.0.0) concurrent-ruby (1.3.4) diff-lcs (1.5.1) docile (1.4.1) @@ -16,7 +14,6 @@ GEM bindata (~> 2) erubi (1.13.0) hana (1.3.7) - highline (3.0.1) json (2.7.2) json_schemer (2.3.0) bigdecimal @@ -33,11 +30,6 @@ GEM parallel (1.26.3) parallel_tests (4.7.2) parallel - parlour (9.0.0) - commander (~> 5.0) - parser - rainbow (~> 3.0) - sorbet-runtime (>= 0.5) parser (3.3.5.0) ast (~> 2.4.1) racc @@ -167,7 +159,6 @@ DEPENDENCIES method_source minitest parallel_tests - parlour patchelf plist pry diff --git a/Library/Homebrew/attrable.rb b/Library/Homebrew/attrable.rb index 8912d7e1add68..8dd176ef240a9 100644 --- a/Library/Homebrew/attrable.rb +++ b/Library/Homebrew/attrable.rb @@ -1,6 +1,10 @@ # typed: strict # frozen_string_literal: true +# This module provides methods to define specialized attributes. +# Method stubs are generated by the {Tapioca::Compilers::Attrables} compiler. +# @note The compiler is fragile, and must be updated if the filename changes, if methods are added or removed, +# or if a method's arity changes. module Attrable extend T::Helpers diff --git a/Library/Homebrew/cask/artifact/abstract_artifact.rb b/Library/Homebrew/cask/artifact/abstract_artifact.rb index a424a8080cf15..fa8057335c955 100644 --- a/Library/Homebrew/cask/artifact/abstract_artifact.rb +++ b/Library/Homebrew/cask/artifact/abstract_artifact.rb @@ -12,7 +12,6 @@ class AbstractArtifact abstract! include Comparable - extend Attrable def self.english_name @english_name ||= T.must(name).sub(/^.*:/, "").gsub(/(.)([A-Z])/, '\1 \2') diff --git a/Library/Homebrew/cask/url.rb b/Library/Homebrew/cask/url.rb index 6cbfdd13fae85..0fc7ead73f1ff 100644 --- a/Library/Homebrew/cask/url.rb +++ b/Library/Homebrew/cask/url.rb @@ -6,7 +6,7 @@ module Cask # Class corresponding to the `url` stanza. - class URL < Delegator + class URL < SimpleDelegator class DSL attr_reader :uri, :tag, :branch, :revisions, :revision, :trust_cert, :cookies, :header, :data, :only_path @@ -278,12 +278,6 @@ def from_block? private - def __getobj__ = @dsl - - def __setobj__(dsl) - @dsl = dsl - end - sig { returns(T.nilable(String)) } def raw_url_line return @raw_url_line if defined?(@raw_url_line) diff --git a/Library/Homebrew/dependency.rb b/Library/Homebrew/dependency.rb index ac17ea2500c78..7ab9abbafa20e 100644 --- a/Library/Homebrew/dependency.rb +++ b/Library/Homebrew/dependency.rb @@ -7,7 +7,6 @@ # # @api internal class Dependency - extend Forwardable include Dependable extend Cachable diff --git a/Library/Homebrew/dev-cmd/typecheck.rb b/Library/Homebrew/dev-cmd/typecheck.rb index de22b26b1545c..3f16dae3179a9 100644 --- a/Library/Homebrew/dev-cmd/typecheck.rb +++ b/Library/Homebrew/dev-cmd/typecheck.rb @@ -66,7 +66,6 @@ def run ohai "Updating Tapioca RBI files..." safe_system "bundle", "exec", "tapioca", "gem", *tapioca_args - safe_system "bundle", "exec", "parlour" if args.suggest_typed? ohai "Checking if we can bump Sorbet `typed` sigils..." diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index a8cd27324d037..09858f5f6998f 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -24,7 +24,6 @@ class Mechanize; end # @abstract Abstract superclass for all download strategies. class AbstractDownloadStrategy - extend Forwardable include FileUtils include Context include SystemCommand::Mixin diff --git a/Library/Homebrew/rubocops/cask/stanza_order.rb b/Library/Homebrew/rubocops/cask/stanza_order.rb index ab9fc96e390c8..8de4858936f62 100644 --- a/Library/Homebrew/rubocops/cask/stanza_order.rb +++ b/Library/Homebrew/rubocops/cask/stanza_order.rb @@ -10,7 +10,6 @@ module Cask # @see https://docs.brew.sh/Cask-Cookbook#stanza-order class StanzaOrder < Base include IgnoredNode - extend Forwardable extend AutoCorrector include CaskHelp diff --git a/Library/Homebrew/rubocops/cask/url.rb b/Library/Homebrew/rubocops/cask/url.rb index b44e2be242df7..eb13ea093602b 100644 --- a/Library/Homebrew/rubocops/cask/url.rb +++ b/Library/Homebrew/rubocops/cask/url.rb @@ -21,7 +21,6 @@ module Cask # ``` class Url < Base extend AutoCorrector - extend Forwardable include OnUrlStanza include UrlHelper diff --git a/Library/Homebrew/sorbet/parlour.rb b/Library/Homebrew/sorbet/parlour.rb deleted file mode 100644 index 1092e03dd6211..0000000000000 --- a/Library/Homebrew/sorbet/parlour.rb +++ /dev/null @@ -1,43 +0,0 @@ -# typed: true # rubocop:todo Sorbet/StrictSigil -# frozen_string_literal: true - -require_relative "../extend/module" -require_relative "../warnings" -Warnings.ignore :parser_syntax do - require "parser/current" -end - -module Homebrew - # Parlour type signature generator helper class for Homebrew. - module Parlour - ROOT_DIR = T.let(Pathname(T.must(__dir__)).parent.realpath.freeze, Pathname).freeze - - sig { returns(T::Array[Parser::AST::Node]) } - def self.ast_list - @ast_list ||= begin - ast_list = [] - parser = Parser::CurrentRuby.new - prune_dirs = %w[sorbet shims test vendor].freeze - - ROOT_DIR.find do |path| - Find.prune if path.directory? && prune_dirs.any? { |subdir| path == ROOT_DIR/subdir } - - Find.prune if path.file? && path.extname != ".rb" - - next unless path.file? - - buffer = Parser::Source::Buffer.new(path, source: path.read) - - parser.reset - ast = parser.parse(buffer) - ast_list << ast if ast - end - - ast_list - end - end - end -end - -require "parlour" -require_relative "parlour/attr" diff --git a/Library/Homebrew/sorbet/parlour/attr.rb b/Library/Homebrew/sorbet/parlour/attr.rb deleted file mode 100644 index 5fdc404d16577..0000000000000 --- a/Library/Homebrew/sorbet/parlour/attr.rb +++ /dev/null @@ -1,162 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -# Parlour type signature generator plugin for Homebrew DSL attributes. -class Attr < Parlour::Plugin - sig { override.params(root: Parlour::RbiGenerator::Namespace).void } - def generate(root) - tree = T.let([], T::Array[T.untyped]) - Homebrew::Parlour.ast_list.each do |node| - tree += find_custom_attr(node) - end - process_custom_attr(tree, root) - end - - sig { override.returns(T.nilable(String)) } - def strictness - "strict" - end - - private - - sig { params(node: Parser::AST::Node, list: T::Array[String]).returns(T::Array[String]) } - def traverse_module_name(node, list = []) - parent, name = node.children - list = traverse_module_name(parent, list) if parent - list << name.to_s - list - end - - sig { params(node: T.nilable(Parser::AST::Node)).returns(T.nilable(String)) } - def extract_module_name(node) - return if node.nil? - - traverse_module_name(node).join("::") - end - - sig { params(node: Parser::AST::Node).returns(T::Array[T.untyped]) } - def find_custom_attr(node) - tree = T.let([], T::Array[T.untyped]) - children = node.children.dup - - if node.type == :begin - children.each do |child| - subtree = find_custom_attr(child) - tree += subtree unless subtree.empty? - end - elsif node.type == :sclass - subtree = find_custom_attr(node.children[1]) - return tree if subtree.empty? - - tree << [:sclass, subtree] - elsif node.type == :class || node.type == :module - element = [] - case node.type - when :class - element << :class - element << extract_module_name(children.shift) - element << extract_module_name(children.shift) - when :module - element << :module - element << extract_module_name(children.shift) - end - - body = children.shift - return tree if body.nil? - - subtree = find_custom_attr(body) - return tree if subtree.empty? - - element << subtree - tree << element - elsif node.type == :send && children.shift.nil? - method_name = children.shift - - case method_name - when :attr_rw, :attr_predicate - children.each do |name_node| - tree << [method_name, name_node.children.first.to_s] - end - when :delegate - children.each do |name_node| - name_node.children.each do |pair| - delegated_method = pair.children.first - delegated_methods = if delegated_method.type == :array - delegated_method.children - else - [delegated_method] - end - - delegated_methods.each do |delegated_method_sym| - tree << [method_name, delegated_method_sym.children.first.to_s] - end - end - end - end - end - - tree - end - - ARRAY_METHODS = T.let(["to_a", "to_ary"].freeze, T::Array[String]) - HASH_METHODS = T.let(["to_h", "to_hash"].freeze, T::Array[String]) - STRING_METHODS = T.let(["to_s", "to_str", "to_json"].freeze, T::Array[String]) - - sig { params(tree: T::Array[T.untyped], namespace: Parlour::RbiGenerator::Namespace, sclass: T::Boolean).void } - def process_custom_attr(tree, namespace, sclass: false) - tree.each do |node| - type = node.shift - case type - when :sclass - process_custom_attr(node.shift, namespace, sclass: true) - when :class - class_namespace = namespace.create_class(node.shift, superclass: node.shift) - process_custom_attr(node.shift, class_namespace) - when :module - module_namespace = namespace.create_module(node.shift) - process_custom_attr(node.shift, module_namespace) - when :attr_rw - name = node.shift - name = "self.#{name}" if sclass - namespace.create_method(name, - parameters: [ - Parlour::RbiGenerator::Parameter.new("arg", type: "T.untyped", - default: "T.unsafe(nil)"), - ], - return_type: "T.untyped") - when :attr_predicate - name = node.shift - name = "self.#{name}" if sclass - namespace.create_method(name, return_type: "T::Boolean") - when :delegate - name = node.shift - - return_type = if name.end_with?("?") - "T::Boolean" - elsif ARRAY_METHODS.include?(name) - "Array" - elsif HASH_METHODS.include?(name) - "Hash" - elsif STRING_METHODS.include?(name) - "String" - else - "T.untyped" - end - - name = "self.#{name}" if sclass - - namespace.create_method( - name, - parameters: [ - Parlour::RbiGenerator::Parameter.new("*args"), - Parlour::RbiGenerator::Parameter.new("**options"), - Parlour::RbiGenerator::Parameter.new("&block"), - ], - return_type:, - ) - else - raise "Malformed tree." - end - end - end -end diff --git a/Library/Homebrew/sorbet/rbi/dsl/arch_requirement.rbi b/Library/Homebrew/sorbet/rbi/dsl/arch_requirement.rbi new file mode 100644 index 0000000000000..5de043433f898 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/arch_requirement.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ArchRequirement`. +# Please instead update this file by running `bin/tapioca dsl ArchRequirement`. + + +class ArchRequirement; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/bottle.rbi b/Library/Homebrew/sorbet/rbi/dsl/bottle.rbi new file mode 100644 index 0000000000000..89b7235fc3b09 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/bottle.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Bottle`. +# Please instead update this file by running `bin/tapioca dsl Bottle`. + + +class Bottle + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def cached_download(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def downloader(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def url(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def verify_download_integrity(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/bottle_specification.rbi b/Library/Homebrew/sorbet/rbi/dsl/bottle_specification.rbi new file mode 100644 index 0000000000000..d076578f16f35 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/bottle_specification.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `BottleSpecification`. +# Please instead update this file by running `bin/tapioca dsl BottleSpecification`. + + +class BottleSpecification + sig { params(arg: T.untyped).returns(T.untyped) } + def rebuild(arg = nil); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/audit.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/audit.rbi new file mode 100644 index 0000000000000..9f9cb7d83a8ca --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/audit.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::Audit`. +# Please instead update this file by running `bin/tapioca dsl Cask::Audit`. + + +class Cask::Audit + sig { returns(T::Boolean) } + def new_cask?; end + + sig { returns(T::Boolean) } + def online?; end + + sig { returns(T::Boolean) } + def signing?; end + + sig { returns(T::Boolean) } + def strict?; end + + sig { returns(T::Boolean) } + def token_conflicts?; end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi new file mode 100644 index 0000000000000..0c1b092222aa9 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::Cask`. +# Please instead update this file by running `bin/tapioca dsl Cask::Cask`. + + +class Cask::Cask + sig { returns(T::Boolean) } + def loaded_from_api?; end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/dsl.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl.rbi new file mode 100644 index 0000000000000..ecc5e8731a629 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::DSL`. +# Please instead update this file by running `bin/tapioca dsl Cask::DSL`. + + +class Cask::DSL + sig { returns(T::Boolean) } + def depends_on_set_in_block?; end + + sig { returns(T::Boolean) } + def deprecated?; end + + sig { returns(T::Boolean) } + def disabled?; end + + sig { returns(T::Boolean) } + def livecheckable?; end + + sig { returns(T::Boolean) } + def on_system_blocks_exist?; end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/base.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/base.rbi new file mode 100644 index 0000000000000..87efd856f10c3 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/base.rbi @@ -0,0 +1,29 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::DSL::Base`. +# Please instead update this file by running `bin/tapioca dsl Cask::DSL::Base`. + + +class Cask::DSL::Base + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def appdir(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def arch(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def caskroom_path(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def language(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def staged_path(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def token(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def version(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/caveats.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/caveats.rbi new file mode 100644 index 0000000000000..8a9839ac27d54 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/caveats.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::DSL::Caveats`. +# Please instead update this file by running `bin/tapioca dsl Cask::DSL::Caveats`. + + +class Cask::DSL::Caveats + sig { returns(T::Boolean) } + def discontinued?; end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/postflight.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/postflight.rbi new file mode 100644 index 0000000000000..5de4699c10eff --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/postflight.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::DSL::Postflight`. +# Please instead update this file by running `bin/tapioca dsl Cask::DSL::Postflight`. + + +class Cask::DSL::Postflight; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/preflight.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/preflight.rbi new file mode 100644 index 0000000000000..ef713a5dfaa55 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/preflight.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::DSL::Preflight`. +# Please instead update this file by running `bin/tapioca dsl Cask::DSL::Preflight`. + + +class Cask::DSL::Preflight; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/uninstall_postflight.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/uninstall_postflight.rbi new file mode 100644 index 0000000000000..45115cd0982c0 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/uninstall_postflight.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::DSL::UninstallPostflight`. +# Please instead update this file by running `bin/tapioca dsl Cask::DSL::UninstallPostflight`. + + +class Cask::DSL::UninstallPostflight; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/uninstall_preflight.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/uninstall_preflight.rbi new file mode 100644 index 0000000000000..55f2f51cc9e42 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/dsl/uninstall_preflight.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::DSL::UninstallPreflight`. +# Please instead update this file by running `bin/tapioca dsl Cask::DSL::UninstallPreflight`. + + +class Cask::DSL::UninstallPreflight; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/installer.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/installer.rbi new file mode 100644 index 0000000000000..6fafb9717974c --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/installer.rbi @@ -0,0 +1,47 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::Installer`. +# Please instead update this file by running `bin/tapioca dsl Cask::Installer`. + + +class Cask::Installer + sig { returns(T::Boolean) } + def adopt?; end + + sig { returns(T::Boolean) } + def binaries?; end + + sig { returns(T::Boolean) } + def force?; end + + sig { returns(T::Boolean) } + def installed_as_dependency?; end + + sig { returns(T::Boolean) } + def installed_on_request?; end + + sig { returns(T::Boolean) } + def quarantine?; end + + sig { returns(T::Boolean) } + def quiet?; end + + sig { returns(T::Boolean) } + def reinstall?; end + + sig { returns(T::Boolean) } + def require_sha?; end + + sig { returns(T::Boolean) } + def skip_cask_deps?; end + + sig { returns(T::Boolean) } + def upgrade?; end + + sig { returns(T::Boolean) } + def verbose?; end + + sig { returns(T::Boolean) } + def zap?; end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/url/dsl.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/url/dsl.rbi new file mode 100644 index 0000000000000..4ae15d814f7b0 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/url/dsl.rbi @@ -0,0 +1,17 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Cask::URL::DSL`. +# Please instead update this file by running `bin/tapioca dsl Cask::URL::DSL`. + + +class Cask::URL::DSL + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def path(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def scheme(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(String) } + def to_s(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/caveats.rbi b/Library/Homebrew/sorbet/rbi/dsl/caveats.rbi new file mode 100644 index 0000000000000..dbe807aa31a0a --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/caveats.rbi @@ -0,0 +1,14 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Caveats`. +# Please instead update this file by running `bin/tapioca dsl Caveats`. + + +class Caveats + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def empty?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(String) } + def to_s(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/checksum.rbi b/Library/Homebrew/sorbet/rbi/dsl/checksum.rbi new file mode 100644 index 0000000000000..8f2fe586755cd --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/checksum.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Checksum`. +# Please instead update this file by running `bin/tapioca dsl Checksum`. + + +class Checksum + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def [](*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def empty?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def length(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(String) } + def to_s(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/codesign_requirement.rbi b/Library/Homebrew/sorbet/rbi/dsl/codesign_requirement.rbi new file mode 100644 index 0000000000000..a15cb3779fe6e --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/codesign_requirement.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `CodesignRequirement`. +# Please instead update this file by running `bin/tapioca dsl CodesignRequirement`. + + +class CodesignRequirement; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/debrew.rbi b/Library/Homebrew/sorbet/rbi/dsl/debrew.rbi new file mode 100644 index 0000000000000..89b6cf74129e2 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/debrew.rbi @@ -0,0 +1,13 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Debrew`. +# Please instead update this file by running `bin/tapioca dsl Debrew`. + + +module Debrew + class << self + sig { returns(T::Boolean) } + def active?; end + end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/external_patch.rbi b/Library/Homebrew/sorbet/rbi/dsl/external_patch.rbi new file mode 100644 index 0000000000000..d60c0560a03f3 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/external_patch.rbi @@ -0,0 +1,29 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ExternalPatch`. +# Please instead update this file by running `bin/tapioca dsl ExternalPatch`. + + +class ExternalPatch + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def cached_download(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def clear_cache(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def downloaded?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def fetch(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def patch_files(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def url(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def verify_download_integrity(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/formula.rbi b/Library/Homebrew/sorbet/rbi/dsl/formula.rbi new file mode 100644 index 0000000000000..06810994c33f3 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/formula.rbi @@ -0,0 +1,154 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Formula`. +# Please instead update this file by running `bin/tapioca dsl Formula`. + + +class Formula + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def allow_network_access!(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def bottle_defined?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def bottle_specification(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def bottle_tag?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def bottled?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def cached_download(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def clear_cache(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def compiler_failures(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def declared_deps(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def deny_network_access!(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def deprecated?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def deprecated_flags(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def deprecated_options(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def deprecation_date(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def deprecation_reason(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def deps(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def desc(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def disable_date(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def disable_reason(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def disabled?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def downloader(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def env(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def homepage(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def keg_only_reason(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def license(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def livecheck(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def livecheckable?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def loaded_from_api?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def network_access_allowed?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def option_defined?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def options(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def patchlist(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def pin(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def pinnable?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def pinned?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def pinned_version(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def pour_bottle_check_unsatisfied_reason(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def requirements(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def resources(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def service?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def unpin(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def version(*args, &block); end + + class << self + sig { params(arg: T.untyped).returns(T.untyped) } + def desc(arg = nil); end + + sig { params(arg: T.untyped).returns(T.untyped) } + def homepage(arg = nil); end + + sig { returns(T::Boolean) } + def loaded_from_api?; end + + sig { returns(T::Boolean) } + def on_system_blocks_exist?; end + + sig { params(arg: T.untyped).returns(T.untyped) } + def revision(arg = nil); end + + sig { params(arg: T.untyped).returns(T.untyped) } + def version_scheme(arg = nil); end + end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/formula_installer.rbi b/Library/Homebrew/sorbet/rbi/dsl/formula_installer.rbi new file mode 100644 index 0000000000000..e6cdede310cd1 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/formula_installer.rbi @@ -0,0 +1,56 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `FormulaInstaller`. +# Please instead update this file by running `bin/tapioca dsl FormulaInstaller`. + + +class FormulaInstaller + sig { returns(T::Boolean) } + def debug?; end + + sig { returns(T::Boolean) } + def debug_symbols?; end + + sig { returns(T::Boolean) } + def force?; end + + sig { returns(T::Boolean) } + def force_bottle?; end + + sig { returns(T::Boolean) } + def git?; end + + sig { returns(T::Boolean) } + def ignore_deps?; end + + sig { returns(T::Boolean) } + def installed_as_dependency?; end + + sig { returns(T::Boolean) } + def installed_on_request?; end + + sig { returns(T::Boolean) } + def interactive?; end + + sig { returns(T::Boolean) } + def keep_tmp?; end + + sig { returns(T::Boolean) } + def only_deps?; end + + sig { returns(T::Boolean) } + def overwrite?; end + + sig { returns(T::Boolean) } + def quiet?; end + + sig { returns(T::Boolean) } + def show_header?; end + + sig { returns(T::Boolean) } + def show_summary_heading?; end + + sig { returns(T::Boolean) } + def verbose?; end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/head_software_spec.rbi b/Library/Homebrew/sorbet/rbi/dsl/head_software_spec.rbi new file mode 100644 index 0000000000000..e539f5f1f31d1 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/head_software_spec.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `HeadSoftwareSpec`. +# Please instead update this file by running `bin/tapioca dsl HeadSoftwareSpec`. + + +class HeadSoftwareSpec; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/homebrew/cleanup.rbi b/Library/Homebrew/sorbet/rbi/dsl/homebrew/cleanup.rbi new file mode 100644 index 0000000000000..852b2b5cc732b --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/homebrew/cleanup.rbi @@ -0,0 +1,17 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Homebrew::Cleanup`. +# Please instead update this file by running `bin/tapioca dsl Homebrew::Cleanup`. + + +class Homebrew::Cleanup + sig { returns(T::Boolean) } + def dry_run?; end + + sig { returns(T::Boolean) } + def prune?; end + + sig { returns(T::Boolean) } + def scrub?; end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/homebrew/livecheck/strategy/extract_plist/item.rbi b/Library/Homebrew/sorbet/rbi/dsl/homebrew/livecheck/strategy/extract_plist/item.rbi new file mode 100644 index 0000000000000..2b7646998678e --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/homebrew/livecheck/strategy/extract_plist/item.rbi @@ -0,0 +1,14 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Homebrew::Livecheck::Strategy::ExtractPlist::Item`. +# Please instead update this file by running `bin/tapioca dsl Homebrew::Livecheck::Strategy::ExtractPlist::Item`. + + +class Homebrew::Livecheck::Strategy::ExtractPlist::Item + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def short_version(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def version(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/homebrew/livecheck/strategy/sparkle/item.rbi b/Library/Homebrew/sorbet/rbi/dsl/homebrew/livecheck/strategy/sparkle/item.rbi new file mode 100644 index 0000000000000..f6e1e7c3d3672 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/homebrew/livecheck/strategy/sparkle/item.rbi @@ -0,0 +1,17 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Homebrew::Livecheck::Strategy::Sparkle::Item`. +# Please instead update this file by running `bin/tapioca dsl Homebrew::Livecheck::Strategy::Sparkle::Item`. + + +class Homebrew::Livecheck::Strategy::Sparkle::Item + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def nice_version(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def short_version(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def version(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/homebrew/service.rbi b/Library/Homebrew/sorbet/rbi/dsl/homebrew/service.rbi new file mode 100644 index 0000000000000..aa0f69559d603 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/homebrew/service.rbi @@ -0,0 +1,35 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Homebrew::Service`. +# Please instead update this file by running `bin/tapioca dsl Homebrew::Service`. + + +class Homebrew::Service + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def bin(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def etc(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def libexec(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def opt_bin(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def opt_libexec(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def opt_pkgshare(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def opt_prefix(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def opt_sbin(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def var(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/keg.rbi b/Library/Homebrew/sorbet/rbi/dsl/keg.rbi new file mode 100644 index 0000000000000..5b8d1808deacf --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/keg.rbi @@ -0,0 +1,41 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Keg`. +# Please instead update this file by running `bin/tapioca dsl Keg`. + + +class Keg + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def /(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def abv(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def directory?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def disk_usage(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def exist?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def file_count(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def find(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def hash(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def join(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def rename(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def to_path(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/linux_requirement.rbi b/Library/Homebrew/sorbet/rbi/dsl/linux_requirement.rbi new file mode 100644 index 0000000000000..6ad28e5e60521 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/linux_requirement.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `LinuxRequirement`. +# Please instead update this file by running `bin/tapioca dsl LinuxRequirement`. + + +class LinuxRequirement; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/livecheck.rbi b/Library/Homebrew/sorbet/rbi/dsl/livecheck.rbi new file mode 100644 index 0000000000000..f900f942d95ab --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/livecheck.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Livecheck`. +# Please instead update this file by running `bin/tapioca dsl Livecheck`. + + +class Livecheck; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/mac_os_requirement.rbi b/Library/Homebrew/sorbet/rbi/dsl/mac_os_requirement.rbi new file mode 100644 index 0000000000000..9e31d54eb8490 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/mac_os_requirement.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `MacOSRequirement`. +# Please instead update this file by running `bin/tapioca dsl MacOSRequirement`. + + +class MacOSRequirement; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/mach_o_shim.rbi b/Library/Homebrew/sorbet/rbi/dsl/mach_o_shim.rbi new file mode 100644 index 0000000000000..9ebe8128989d7 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/mach_o_shim.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `MachOShim`. +# Please instead update this file by running `bin/tapioca dsl MachOShim`. + + +module MachOShim + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def dylib_id(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/path.rbi b/Library/Homebrew/sorbet/rbi/dsl/path.rbi new file mode 100644 index 0000000000000..03ee37fd3f91c --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/path.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `PATH`. +# Please instead update this file by running `bin/tapioca dsl PATH`. + + +class PATH + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def each(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/pkg_version.rbi b/Library/Homebrew/sorbet/rbi/dsl/pkg_version.rbi new file mode 100644 index 0000000000000..a3a57114d297d --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/pkg_version.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `PkgVersion`. +# Please instead update this file by running `bin/tapioca dsl PkgVersion`. + + +class PkgVersion + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def major(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def major_minor(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def major_minor_patch(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def minor(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def patch(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/requirement.rbi b/Library/Homebrew/sorbet/rbi/dsl/requirement.rbi new file mode 100644 index 0000000000000..e755f8ef2492e --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/requirement.rbi @@ -0,0 +1,19 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Requirement`. +# Please instead update this file by running `bin/tapioca dsl Requirement`. + + +class Requirement + class << self + sig { params(arg: T.untyped).returns(T.untyped) } + def cask(arg = nil); end + + sig { params(arg: T.untyped).returns(T.untyped) } + def download(arg = nil); end + + sig { params(arg: T.untyped).returns(T.untyped) } + def fatal(arg = nil); end + end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/resource_stage_context.rbi b/Library/Homebrew/sorbet/rbi/dsl/resource_stage_context.rbi new file mode 100644 index 0000000000000..74beb32c183e7 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/resource_stage_context.rbi @@ -0,0 +1,29 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ResourceStageContext`. +# Please instead update this file by running `bin/tapioca dsl ResourceStageContext`. + + +class ResourceStageContext + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def mirrors(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def retain!(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def source_modified_time(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def specs(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def url(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def using(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def version(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cask/ast/cask_block.rbi b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cask/ast/cask_block.rbi new file mode 100644 index 0000000000000..f018145a54de4 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cask/ast/cask_block.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `RuboCop::Cask::AST::CaskBlock`. +# Please instead update this file by running `bin/tapioca dsl RuboCop::Cask::AST::CaskBlock`. + + +class RuboCop::Cask::AST::CaskBlock + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def cask_body(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cask/ast/stanza.rbi b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cask/ast/stanza.rbi new file mode 100644 index 0000000000000..0d0b3a1d2318e --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cask/ast/stanza.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `RuboCop::Cask::AST::Stanza`. +# Please instead update this file by running `bin/tapioca dsl RuboCop::Cask::AST::Stanza`. + + +class RuboCop::Cask::AST::Stanza + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def arch_variable?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T::Boolean) } + def on_system_block?(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def parent_node(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def source(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def source_with_comments(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_desc_stanza.rbi b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_desc_stanza.rbi new file mode 100644 index 0000000000000..738033eb688e6 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_desc_stanza.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `RuboCop::Cop::Cask::OnDescStanza`. +# Please instead update this file by running `bin/tapioca dsl RuboCop::Cop::Cask::OnDescStanza`. + + +module RuboCop::Cop::Cask::OnDescStanza + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def toplevel_stanzas(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_homepage_stanza.rbi b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_homepage_stanza.rbi new file mode 100644 index 0000000000000..7b79b7afd8dad --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_homepage_stanza.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `RuboCop::Cop::Cask::OnHomepageStanza`. +# Please instead update this file by running `bin/tapioca dsl RuboCop::Cop::Cask::OnHomepageStanza`. + + +module RuboCop::Cop::Cask::OnHomepageStanza + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def toplevel_stanzas(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_system_conditionals.rbi b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_system_conditionals.rbi new file mode 100644 index 0000000000000..2e9e23d8f37a5 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_system_conditionals.rbi @@ -0,0 +1,14 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `RuboCop::Cop::Cask::OnSystemConditionals`. +# Please instead update this file by running `bin/tapioca dsl RuboCop::Cop::Cask::OnSystemConditionals`. + + +class RuboCop::Cop::Cask::OnSystemConditionals + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def cask_body(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def toplevel_stanzas(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_url_stanza.rbi b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_url_stanza.rbi new file mode 100644 index 0000000000000..dc95164e2b24c --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/on_url_stanza.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `RuboCop::Cop::Cask::OnUrlStanza`. +# Please instead update this file by running `bin/tapioca dsl RuboCop::Cop::Cask::OnUrlStanza`. + + +module RuboCop::Cop::Cask::OnUrlStanza + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def toplevel_stanzas(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/stanza_grouping.rbi b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/stanza_grouping.rbi new file mode 100644 index 0000000000000..e0f1e73ea6a56 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/stanza_grouping.rbi @@ -0,0 +1,14 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `RuboCop::Cop::Cask::StanzaGrouping`. +# Please instead update this file by running `bin/tapioca dsl RuboCop::Cop::Cask::StanzaGrouping`. + + +class RuboCop::Cop::Cask::StanzaGrouping + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def cask_node(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def toplevel_stanzas(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/variables.rbi b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/variables.rbi index 0a0a49466ad01..0a98151863272 100644 --- a/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/variables.rbi +++ b/Library/Homebrew/sorbet/rbi/dsl/rubo_cop/cop/cask/variables.rbi @@ -6,6 +6,9 @@ class RuboCop::Cop::Cask::Variables + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def cask_node(*args, &block); end + sig do params( node: RuboCop::AST::Node, diff --git a/Library/Homebrew/sorbet/rbi/dsl/software_spec.rbi b/Library/Homebrew/sorbet/rbi/dsl/software_spec.rbi new file mode 100644 index 0000000000000..7901841a4fb54 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/software_spec.rbi @@ -0,0 +1,53 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SoftwareSpec`. +# Please instead update this file by running `bin/tapioca dsl SoftwareSpec`. + + +class SoftwareSpec + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def cached_download(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def checksum(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def clear_cache(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def download_name(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def downloader(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def fetch(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def mirror(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def mirrors(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def sha256(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def source_modified_time(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def specs(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def stage(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def using(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def verify_download_integrity(*args, &block); end + + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def version(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/system_command.rbi b/Library/Homebrew/sorbet/rbi/dsl/system_command.rbi new file mode 100644 index 0000000000000..e2e8a6a2aab67 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/system_command.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SystemCommand`. +# Please instead update this file by running `bin/tapioca dsl SystemCommand`. + + +class SystemCommand + sig { returns(T::Boolean) } + def must_succeed?; end + + sig { returns(T::Boolean) } + def reset_uid?; end + + sig { returns(T::Boolean) } + def sudo?; end + + sig { returns(T::Boolean) } + def sudo_as_root?; end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/utils/ast/formula_ast.rbi b/Library/Homebrew/sorbet/rbi/dsl/utils/ast/formula_ast.rbi new file mode 100644 index 0000000000000..0c02809ef63ef --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/utils/ast/formula_ast.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Utils::AST::FormulaAST`. +# Please instead update this file by running `bin/tapioca dsl Utils::AST::FormulaAST`. + + +class Utils::AST::FormulaAST + sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } + def process(*args, &block); end +end diff --git a/Library/Homebrew/sorbet/rbi/dsl/xcode_requirement.rbi b/Library/Homebrew/sorbet/rbi/dsl/xcode_requirement.rbi new file mode 100644 index 0000000000000..6a812e438dc23 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/dsl/xcode_requirement.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `XcodeRequirement`. +# Please instead update this file by running `bin/tapioca dsl XcodeRequirement`. + + +class XcodeRequirement; end diff --git a/Library/Homebrew/sorbet/rbi/gems/parlour@9.0.0.rbi b/Library/Homebrew/sorbet/rbi/gems/parlour@9.0.0.rbi deleted file mode 100644 index 7a10e59561141..0000000000000 --- a/Library/Homebrew/sorbet/rbi/gems/parlour@9.0.0.rbi +++ /dev/null @@ -1,3054 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `parlour` gem. -# Please instead update this file by running `bin/tapioca gem parlour`. - - -# source://parlour//lib/parlour/version.rb#2 -module Parlour; end - -# Responsible for resolving conflicts (that is, multiple definitions with the -# same name) between objects defined in the same namespace. -# -# source://parlour//lib/parlour/conflict_resolver.rb#7 -class Parlour::ConflictResolver - # @return [ConflictResolver] a new instance of ConflictResolver - # - # source://parlour//lib/parlour/conflict_resolver.rb#10 - def initialize; end - - # source://parlour//lib/parlour/conflict_resolver.rb#47 - sig do - params( - namespace: Parlour::RbiGenerator::Namespace, - resolver: T.proc.params(desc: ::String, choices: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T.nilable(::Parlour::RbiGenerator::RbiObject)) - ).void - end - def resolve_conflicts(namespace, &resolver); end - - private - - # source://parlour//lib/parlour/conflict_resolver.rb#244 - sig { params(arr: T::Array[T.untyped]).returns(T::Boolean) } - def all_eql?(arr); end - - # source://parlour//lib/parlour/conflict_resolver.rb#255 - sig { params(namespace: Parlour::RbiGenerator::Namespace, name: T.nilable(::String)).void } - def deduplicate_mixins_of_name(namespace, name); end - - # source://parlour//lib/parlour/conflict_resolver.rb#217 - sig { params(arr: T::Array[T.untyped]).returns(T.nilable(::Symbol)) } - def merge_strategy(arr); end -end - -# source://parlour//lib/parlour/conversion/converter.rb#5 -module Parlour::Conversion; end - -# An abstract class which converts between the node trees of two type -# systems. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://parlour//lib/parlour/conversion/converter.rb#8 -class Parlour::Conversion::Converter - abstract! - - # @return [Converter] a new instance of Converter - # - # source://parlour//lib/parlour/conversion/converter.rb#13 - def initialize; end - - # source://parlour//lib/parlour/conversion/converter.rb#21 - sig { params(msg: ::String, node: ::Parlour::RbiGenerator::RbiObject).void } - def add_warning(msg, node); end - - # source://parlour//lib/parlour/conversion/converter.rb#18 - sig { returns(T::Array[[::String, ::Parlour::TypedObject]]) } - def warnings; end -end - -# Converts RBI types to RBS types. -# -# source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#5 -class Parlour::Conversion::RbiToRbs < ::Parlour::Conversion::Converter - # source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#9 - sig { params(rbs_gen: ::Parlour::RbsGenerator).void } - def initialize(rbs_gen); end - - # source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#18 - sig { params(from: Parlour::RbiGenerator::Namespace, to: Parlour::RbsGenerator::Namespace).void } - def convert_all(from, to); end - - # source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#30 - sig { params(node: ::Parlour::RbiGenerator::RbiObject, new_parent: Parlour::RbsGenerator::Namespace).void } - def convert_object(node, new_parent); end - - # source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#15 - sig { returns(::Parlour::RbsGenerator) } - def rbs_gen; end -end - -# Contains methods to enable debugging facilities for Parlour. -# -# source://parlour//lib/parlour/debugging.rb#6 -module Parlour::Debugging - class << self - # Set whether debug messages should be printed. - # - # source://parlour//lib/parlour/debugging.rb#16 - sig { params(value: T::Boolean).returns(T::Boolean) } - def debug_mode=(value); end - - # Whether debug messages sent by {.debug_puts} should be printed. - # Defaults to true if the PARLOUR_DEBUG environment variable is set. - # - # source://parlour//lib/parlour/debugging.rb#24 - sig { returns(T::Boolean) } - def debug_mode?; end - - # Prints a message with a debugging prefix to STDOUT if {.debug_mode?} is - # true. - # - # source://parlour//lib/parlour/debugging.rb#36 - sig { params(object: T.untyped, message: ::String).void } - def debug_puts(object, message); end - - # Converts the given object into a human-readable prefix to a debug message. - # For example, passing an instance of {ConflictResolver} returns - # "conflict resolver". If the object type is unknown, this returns its class - # name. - # - # source://parlour//lib/parlour/debugging.rb#50 - sig { params(object: T.untyped).returns(::String) } - def name_for_debug_caller(object); end - end -end - -# A module for generating a globally-consistent, nicely-formatted tree of -# output using Unicode block characters. -# -# source://parlour//lib/parlour/debugging.rb#66 -class Parlour::Debugging::Tree - # source://parlour//lib/parlour/debugging.rb#78 - sig { params(colour: T::Boolean).void } - def initialize(colour: T.unsafe(nil)); end - - # Returns a new heading, and then decents the tree one level into it. - # (That is, future output will go under the new heading.) - # - # source://parlour//lib/parlour/debugging.rb#88 - sig { params(message: ::String).returns(::String) } - def begin(message); end - - # Whether to colour output or not. - # - # source://parlour//lib/parlour/debugging.rb#75 - sig { returns(T::Boolean) } - def colour; end - - # Prints the final tree element at the current level, then ascends one - # level. - # - # source://parlour//lib/parlour/debugging.rb#108 - sig { params(message: ::String).returns(::String) } - def end(message); end - - # Prints a new tree element at the current level. - # - # source://parlour//lib/parlour/debugging.rb#99 - sig { params(message: ::String).returns(::String) } - def here(message); end - - # Modifies the current indent level by the given offset. - # - # source://parlour//lib/parlour/debugging.rb#130 - def indent!(offset); end - - # The prefix which should be printed before anything else on this line of - # the tree, based on the current indent level. - # - # @return [String] - # - # source://parlour//lib/parlour/debugging.rb#117 - def line_prefix; end - - # The horizontal lines which should be printed between the beginning of - # the current element and its text, based on the specified number of - # spaces to use for indents. - # - # @return [String] - # - # source://parlour//lib/parlour/debugging.rb#125 - def text_prefix; end -end - -# The number of spaces to indent each layer of the tree by. Should be at -# least 1. -# -# source://parlour//lib/parlour/debugging.rb#71 -Parlour::Debugging::Tree::INDENT_SPACES = T.let(T.unsafe(nil), Integer) - -# source://parlour//lib/parlour/detached_rbi_generator.rb#4 -class Parlour::DetachedRbiGenerator < ::Parlour::RbiGenerator - # source://parlour//lib/parlour/detached_rbi_generator.rb#16 - sig { override.returns(T.nilable(::Parlour::Plugin)) } - def current_plugin; end - - # source://parlour//lib/parlour/detached_rbi_generator.rb#6 - sig { returns(T.untyped) } - def detached!; end - - # source://parlour//lib/parlour/detached_rbi_generator.rb#11 - sig { override.returns(::Parlour::Options) } - def options; end - - # source://parlour//lib/parlour/detached_rbi_generator.rb#21 - sig { override.params(strictness: ::String).returns(::String) } - def rbi(strictness = T.unsafe(nil)); end -end - -# source://parlour//lib/parlour/detached_rbs_generator.rb#4 -class Parlour::DetachedRbsGenerator < ::Parlour::RbsGenerator - # source://parlour//lib/parlour/detached_rbs_generator.rb#16 - sig { override.returns(T.nilable(::Parlour::Plugin)) } - def current_plugin; end - - # source://parlour//lib/parlour/detached_rbs_generator.rb#6 - sig { returns(T.untyped) } - def detached!; end - - # source://parlour//lib/parlour/detached_rbs_generator.rb#11 - sig { override.returns(::Parlour::Options) } - def options; end - - # source://parlour//lib/parlour/detached_rbs_generator.rb#21 - sig { override.returns(::String) } - def rbs; end -end - -# source://parlour//lib/parlour/generator.rb#3 -class Parlour::Generator - # source://parlour//lib/parlour/generator.rb#15 - sig { params(break_params: ::Integer, tab_size: ::Integer, sort_namespaces: T::Boolean).void } - def initialize(break_params: T.unsafe(nil), tab_size: T.unsafe(nil), sort_namespaces: T.unsafe(nil)); end - - # source://parlour//lib/parlour/generator.rb#32 - sig { overridable.returns(T.nilable(::Parlour::Plugin)) } - def current_plugin; end - - # @return [Plugin, nil] - # - # source://parlour//lib/parlour/generator.rb#32 - def current_plugin=(_arg0); end - - # source://parlour//lib/parlour/generator.rb#26 - sig { overridable.returns(::Parlour::Options) } - def options; end -end - -# source://parlour//lib/parlour/mixin/searchable.rb#4 -module Parlour::Mixin; end - -# Extends a particular type system's Namespace class to provide searchable -# children. -# -# @abstract Subclasses must implement the `abstract` methods below. -# -# source://parlour//lib/parlour/mixin/searchable.rb#7 -module Parlour::Mixin::Searchable - extend T::Generic - - abstract! - - Child = type_member { { upper: Parlour::TypedObject } } - - # @abstract - # - # source://parlour//lib/parlour/mixin/searchable.rb#16 - sig { abstract.returns(T::Array[Child]) } - def children; end - - # source://parlour//lib/parlour/mixin/searchable.rb#24 - sig { params(name: T.nilable(::String), type: T.nilable(::Class)).returns(Child) } - def find(name: T.unsafe(nil), type: T.unsafe(nil)); end - - # source://parlour//lib/parlour/mixin/searchable.rb#34 - sig { params(name: T.nilable(::String), type: T.nilable(::Class)).returns(T::Array[Child]) } - def find_all(name: T.unsafe(nil), type: T.unsafe(nil)); end - - private - - # source://parlour//lib/parlour/mixin/searchable.rb#48 - sig { params(child: Child, name: T.nilable(::String), type: T.nilable(::Class)).returns(T::Boolean) } - def searchable_child_matches(child, name, type); end -end - -# A set of immutable formatting options. -# -# source://parlour//lib/parlour/options.rb#4 -class Parlour::Options - # source://parlour//lib/parlour/options.rb#19 - sig { params(break_params: ::Integer, tab_size: ::Integer, sort_namespaces: T::Boolean).void } - def initialize(break_params:, tab_size:, sort_namespaces:); end - - # source://parlour//lib/parlour/options.rb#43 - sig { returns(::Integer) } - def break_params; end - - # source://parlour//lib/parlour/options.rb#67 - sig { params(level: ::Integer, str: ::String).returns(::String) } - def indented(level, str); end - - # source://parlour//lib/parlour/options.rb#58 - sig { returns(T::Boolean) } - def sort_namespaces; end - - # source://parlour//lib/parlour/options.rb#48 - sig { returns(::Integer) } - def tab_size; end -end - -# source://parlour//lib/parlour/parse_error.rb#4 -class Parlour::ParseError < ::StandardError - # @return [ParseError] a new instance of ParseError - # - # source://parlour//lib/parlour/parse_error.rb#13 - def initialize(buffer, range); end - - # source://parlour//lib/parlour/parse_error.rb#8 - sig { returns(::Parser::Source::Buffer) } - def buffer; end - - # source://parlour//lib/parlour/parse_error.rb#11 - sig { returns(::Parser::Source::Range) } - def range; end -end - -# The base class for user-defined RBI generation plugins. -# -# @abstract -# -# source://parlour//lib/parlour/plugin.rb#5 -class Parlour::Plugin - abstract! - - # source://parlour//lib/parlour/plugin.rb#54 - sig { params(options: T::Hash[T.untyped, T.untyped]).void } - def initialize(options); end - - # @abstract - # - # source://parlour//lib/parlour/plugin.rb#63 - sig { abstract.params(root: Parlour::RbiGenerator::Namespace).void } - def generate(root); end - - # source://parlour//lib/parlour/plugin.rb#70 - sig { returns(T.nilable(::String)) } - def strictness; end - - # @return [String, nil] - # - # source://parlour//lib/parlour/plugin.rb#70 - def strictness=(_arg0); end - - class << self - # source://parlour//lib/parlour/plugin.rb#27 - sig { params(new_plugin: T.class_of(Parlour::Plugin)).void } - def inherited(new_plugin); end - - # source://parlour//lib/parlour/plugin.rb#17 - sig { returns(T::Hash[::String, T.class_of(Parlour::Plugin)]) } - def registered_plugins; end - - # source://parlour//lib/parlour/plugin.rb#40 - sig do - params( - plugins: T::Array[::Parlour::Plugin], - generator: ::Parlour::RbiGenerator, - allow_failure: T::Boolean - ).void - end - def run_plugins(plugins, generator, allow_failure: T.unsafe(nil)); end - end -end - -# The RBI generator. -# -# source://parlour//lib/parlour/rbi_generator/parameter.rb#4 -class Parlour::RbiGenerator < ::Parlour::Generator - # @return [RbiGenerator] a new instance of RbiGenerator - # - # source://parlour//lib/parlour/rbi_generator.rb#9 - def initialize(**hash); end - - # source://parlour//lib/parlour/rbi_generator.rb#23 - sig { overridable.params(strictness: ::String).returns(::String) } - def rbi(strictness = T.unsafe(nil)); end - - # source://parlour//lib/parlour/rbi_generator.rb#17 - sig { overridable.returns(Parlour::RbiGenerator::Namespace) } - def root; end -end - -# Represents miscellaneous Ruby code. -# -# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#5 -class Parlour::RbiGenerator::Arbitrary < ::Parlour::RbiGenerator::RbiObject - # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#17 - sig do - params( - generator: ::Parlour::Generator, - code: ::String, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Arbitrary).void) - ).void - end - def initialize(generator, code: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#33 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#25 - sig { returns(::String) } - def code; end - - # @return [String] - # - # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#25 - def code=(_arg0); end - - # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#84 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#89 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#48 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbi(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#79 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#63 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end -end - -# Represents an attribute reader, writer or accessor. -# -# source://parlour//lib/parlour/rbi_generator/attribute.rb#5 -class Parlour::RbiGenerator::Attribute < ::Parlour::RbiGenerator::Method - # source://parlour//lib/parlour/rbi_generator/attribute.rb#28 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - kind: ::Symbol, - type: T.any(::Parlour::Types::Type, ::String), - class_attribute: T::Boolean, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Attribute).void) - ).void - end - def initialize(generator, name, kind, type, class_attribute: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/attribute.rb#68 - sig { override.params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbi_generator/attribute.rb#56 - sig { returns(T::Boolean) } - def class_attribute; end - - # source://parlour//lib/parlour/rbi_generator/attribute.rb#82 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/attribute.rb#77 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/attribute.rb#52 - sig { returns(::Symbol) } - def kind; end - - # source://parlour//lib/parlour/rbi_generator/attribute.rb#60 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def type; end - - private - - # source://parlour//lib/parlour/rbi_generator/attribute.rb#103 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_definition(indent_level, options); end -end - -# Represents a class definition. -# -# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#5 -class Parlour::RbiGenerator::ClassNamespace < ::Parlour::RbiGenerator::Namespace - extend T::Generic - - Child = type_member { { fixed: Parlour::RbiGenerator::RbiObject } } - - # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#33 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - final: T::Boolean, - sealed: T::Boolean, - superclass: T.nilable(::String), - abstract: T::Boolean, - block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void) - ).void - end - def initialize(generator, name, final, sealed, superclass, abstract, &block); end - - # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#70 - sig { returns(T::Boolean) } - def abstract; end - - # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#116 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#122 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#50 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbi(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#104 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#84 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#65 - sig { returns(T.nilable(::String)) } - def superclass; end -end - -# Represents a constant definition. -# -# source://parlour//lib/parlour/rbi_generator/constant.rb#5 -class Parlour::RbiGenerator::Constant < ::Parlour::RbiGenerator::RbiObject - # source://parlour//lib/parlour/rbi_generator/constant.rb#21 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - value: T.any(::Parlour::Types::Type, ::String), - eigen_constant: T::Boolean, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Constant).void) - ).void - end - def initialize(generator, name: T.unsafe(nil), value: T.unsafe(nil), eigen_constant: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/constant.rb#42 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbi_generator/constant.rb#99 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # @return [Boolean] Whether this constant is defined on the eigenclass - # of the current namespace. - # - # source://parlour//lib/parlour/rbi_generator/constant.rb#34 - def eigen_constant; end - - # source://parlour//lib/parlour/rbi_generator/constant.rb#104 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/constant.rb#58 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbi(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/constant.rb#94 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/constant.rb#77 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbi_generator/constant.rb#30 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def value; end -end - -# Represents an enum definition; that is, a class with an +enum+ call. -# -# source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#5 -class Parlour::RbiGenerator::EnumClassNamespace < ::Parlour::RbiGenerator::ClassNamespace - extend T::Generic - - Child = type_member { { fixed: Parlour::RbiGenerator::RbiObject } } - - # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#32 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - final: T::Boolean, - sealed: T::Boolean, - enums: T::Array[T.any(::String, [::String, ::String])], - abstract: T::Boolean, - block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::EnumClassNamespace).void) - ).void - end - def initialize(generator, name, final, sealed, enums, abstract, &block); end - - # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#121 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#40 - sig { returns(T::Array[T.any(::String, [::String, ::String])]) } - def enums; end - - # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#116 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#54 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_body(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#104 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#86 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end -end - -# Represents an +extend+ call. -# -# source://parlour//lib/parlour/rbi_generator/extend.rb#5 -class Parlour::RbiGenerator::Extend < ::Parlour::RbiGenerator::RbiObject - # source://parlour//lib/parlour/rbi_generator/extend.rb#16 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Extend).void) - ).void - end - def initialize(generator, name: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/extend.rb#27 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbi_generator/extend.rb#82 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/extend.rb#79 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/extend.rb#42 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbi(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/extend.rb#74 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/extend.rb#57 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end -end - -# Represents an +include+ call. -# -# source://parlour//lib/parlour/rbi_generator/include.rb#5 -class Parlour::RbiGenerator::Include < ::Parlour::RbiGenerator::RbiObject - # source://parlour//lib/parlour/rbi_generator/include.rb#16 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Include).void) - ).void - end - def initialize(generator, name: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/include.rb#27 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbi_generator/include.rb#82 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/include.rb#79 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/include.rb#42 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbi(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/include.rb#74 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/include.rb#57 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end -end - -# Represents a method definition. -# -# source://parlour//lib/parlour/rbi_generator/method.rb#5 -class Parlour::RbiGenerator::Method < ::Parlour::RbiGenerator::RbiObject - # source://parlour//lib/parlour/rbi_generator/method.rb#45 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - parameters: T::Array[::Parlour::RbiGenerator::Parameter], - return_type: T.nilable(T.any(::Parlour::Types::Type, ::String)), - abstract: T::Boolean, - implementation: T::Boolean, - override: T::Boolean, - overridable: T::Boolean, - class_method: T::Boolean, - final: T::Boolean, - type_parameters: T.nilable(T::Array[::Symbol]), - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Method).void) - ).void - end - def initialize(generator, name, parameters, return_type = T.unsafe(nil), abstract: T.unsafe(nil), implementation: T.unsafe(nil), override: T.unsafe(nil), overridable: T.unsafe(nil), class_method: T.unsafe(nil), final: T.unsafe(nil), type_parameters: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/method.rb#65 - sig { overridable.params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbi_generator/method.rb#92 - sig { returns(T::Boolean) } - def abstract; end - - # source://parlour//lib/parlour/rbi_generator/method.rb#117 - sig { returns(T::Boolean) } - def class_method; end - - # source://parlour//lib/parlour/rbi_generator/method.rb#217 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/method.rb#122 - sig { returns(T::Boolean) } - def final; end - - # source://parlour//lib/parlour/rbi_generator/method.rb#210 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/method.rb#140 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbi(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/method.rb#100 - sig { returns(T::Boolean) } - def implementation; end - - # source://parlour//lib/parlour/rbi_generator/method.rb#205 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/method.rb#188 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbi_generator/method.rb#111 - sig { returns(T::Boolean) } - def overridable; end - - # source://parlour//lib/parlour/rbi_generator/method.rb#106 - sig { returns(T::Boolean) } - def override; end - - # source://parlour//lib/parlour/rbi_generator/method.rb#82 - sig { returns(T::Array[::Parlour::RbiGenerator::Parameter]) } - def parameters; end - - # source://parlour//lib/parlour/rbi_generator/method.rb#87 - sig { returns(T.nilable(T.any(::Parlour::Types::Type, ::String))) } - def return_type; end - - # source://parlour//lib/parlour/rbi_generator/method.rb#127 - sig { returns(T::Array[::Symbol]) } - def type_parameters; end - - private - - # source://parlour//lib/parlour/rbi_generator/method.rb#244 - sig { overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_definition(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/method.rb#261 - sig { returns(::String) } - def qualifiers; end -end - -# Represents a module definition. -# -# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#5 -class Parlour::RbiGenerator::ModuleNamespace < ::Parlour::RbiGenerator::Namespace - extend T::Generic - - Child = type_member { { fixed: Parlour::RbiGenerator::RbiObject } } - - # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#33 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - final: T::Boolean, - sealed: T::Boolean, - interface: T::Boolean, - abstract: T::Boolean, - block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void) - ).void - end - def initialize(generator, name, final, sealed, interface, abstract, &block); end - - # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#68 - sig { returns(T::Boolean) } - def abstract; end - - # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#111 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#106 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#51 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbi(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#63 - sig { returns(T::Boolean) } - def interface; end - - # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#101 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#82 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end -end - -# A generic namespace. This shouldn't be used, except as the type of -# {RbiGenerator#root}. -# -# source://parlour//lib/parlour/rbi_generator/namespace.rb#6 -class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject - extend T::Generic - include ::Parlour::Mixin::Searchable - - Child = type_member { { fixed: Parlour::RbiGenerator::RbiObject } } - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#45 - sig do - params( - generator: ::Parlour::Generator, - name: T.nilable(::String), - final: T::Boolean, - sealed: T::Boolean, - block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Namespace).void) - ).void - end - def initialize(generator, name = T.unsafe(nil), final = T.unsafe(nil), sealed = T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#157 - sig { params(comment: T.any(::String, T::Array[::String])).void } - def add_comment_to_next_child(comment); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#95 - sig { returns(T::Array[::Parlour::RbiGenerator::TypeAlias]) } - def aliases; end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#67 - sig { override.returns(T::Array[::Parlour::RbiGenerator::RbiObject]) } - def children; end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#106 - sig { returns(T::Array[::Parlour::RbiGenerator::Constant]) } - def constants; end - - # Creates a new arbitrary code section. - # You should rarely have to use this! - # - # @param code [String] The code to insert. - # @param block A block which the new instance yields itself to. - # @return [RbiGenerator::Arbitrary] - # - # source://parlour//lib/parlour/rbi_generator/namespace.rb#482 - def create_arbitrary(code:, &block); end - - # @param name [String] - # @param kind [Symbol] - # @param type [Types::TypeLike] - # @param class_attribute [Boolean] - # @param block [T.proc.params(x: Attribute).void, nil] - # @return [Attribute] - # - # source://sorbet-runtime/0.5.11409/lib/types/private/methods/_methods.rb#257 - def create_attr(*args, **_arg1, &blk); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#472 - sig do - params( - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - class_attribute: T::Boolean, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Attribute).void) - ).returns(::Parlour::RbiGenerator::Attribute) - end - def create_attr_accessor(name, type:, class_attribute: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#430 - sig do - params( - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - class_attribute: T::Boolean, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Attribute).void) - ).returns(::Parlour::RbiGenerator::Attribute) - end - def create_attr_reader(name, type:, class_attribute: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#451 - sig do - params( - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - class_attribute: T::Boolean, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Attribute).void) - ).returns(::Parlour::RbiGenerator::Attribute) - end - def create_attr_writer(name, type:, class_attribute: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#398 - sig do - params( - name: ::String, - kind: ::Symbol, - type: T.any(::Parlour::Types::Type, ::String), - class_attribute: T::Boolean, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Attribute).void) - ).returns(::Parlour::RbiGenerator::Attribute) - end - def create_attribute(name, kind:, type:, class_attribute: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#193 - sig do - params( - name: ::String, - final: T::Boolean, - sealed: T::Boolean, - superclass: T.nilable(::String), - abstract: T::Boolean, - block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void) - ).returns(Parlour::RbiGenerator::ClassNamespace) - end - def create_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), superclass: T.unsafe(nil), abstract: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#579 - sig do - params( - name: ::String, - value: ::String, - eigen_constant: T::Boolean, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Constant).void) - ).returns(::Parlour::RbiGenerator::Constant) - end - def create_constant(name, value:, eigen_constant: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#222 - sig do - params( - name: ::String, - final: T::Boolean, - sealed: T::Boolean, - enums: T.nilable(T::Array[T.any(::String, [::String, ::String])]), - abstract: T::Boolean, - block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::EnumClassNamespace).void) - ).returns(Parlour::RbiGenerator::EnumClassNamespace) - end - def create_enum_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), enums: T.unsafe(nil), abstract: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#503 - sig do - params( - name: ::String, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Extend).void) - ).returns(::Parlour::RbiGenerator::Extend) - end - def create_extend(name, &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#522 - sig { params(extendables: T::Array[::String]).returns(T::Array[::Parlour::RbiGenerator::Extend]) } - def create_extends(extendables); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#540 - sig do - params( - name: ::String, - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Include).void) - ).returns(::Parlour::RbiGenerator::Include) - end - def create_include(name, &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#559 - sig { params(includables: T::Array[::String]).returns(T::Array[::Parlour::RbiGenerator::Include]) } - def create_includes(includables); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#333 - sig do - params( - name: ::String, - parameters: T.nilable(T::Array[::Parlour::RbiGenerator::Parameter]), - return_type: T.nilable(T.any(::Parlour::Types::Type, ::String)), - returns: T.nilable(T.any(::Parlour::Types::Type, ::String)), - abstract: T::Boolean, - implementation: T::Boolean, - override: T::Boolean, - overridable: T::Boolean, - class_method: T::Boolean, - final: T::Boolean, - type_parameters: T.nilable(T::Array[::Symbol]), - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Method).void) - ).returns(::Parlour::RbiGenerator::Method) - end - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), returns: T.unsafe(nil), abstract: T.unsafe(nil), implementation: T.unsafe(nil), override: T.unsafe(nil), overridable: T.unsafe(nil), class_method: T.unsafe(nil), final: T.unsafe(nil), type_parameters: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#289 - sig do - params( - name: ::String, - final: T::Boolean, - sealed: T::Boolean, - interface: T::Boolean, - abstract: T::Boolean, - block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void) - ).returns(Parlour::RbiGenerator::ModuleNamespace) - end - def create_module(name, final: T.unsafe(nil), sealed: T.unsafe(nil), interface: T.unsafe(nil), abstract: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#253 - sig do - params( - name: ::String, - final: T::Boolean, - sealed: T::Boolean, - props: T.nilable(T::Array[::Parlour::RbiGenerator::StructProp]), - abstract: T::Boolean, - block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::StructClassNamespace).void) - ).returns(Parlour::RbiGenerator::StructClassNamespace) - end - def create_struct_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), props: T.unsafe(nil), abstract: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#602 - sig do - params( - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::TypeAlias).void) - ).returns(::Parlour::RbiGenerator::TypeAlias) - end - def create_type_alias(name, type:, &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#660 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#75 - sig { returns(T::Array[::Parlour::RbiGenerator::Extend]) } - def extends; end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#57 - sig { returns(T::Boolean) } - def final; end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#655 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#21 - sig { override.overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbi(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#85 - sig { returns(T::Array[::Parlour::RbiGenerator::Include]) } - def includes; end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#645 - sig { override.overridable.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#627 - sig { override.overridable.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#120 - sig { params(constant: ::Module, block: T.proc.params(x: Parlour::RbiGenerator::Namespace).void).void } - def path(constant, &block); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#62 - sig { returns(T::Boolean) } - def sealed; end - - # @return [Array] - # - # source://sorbet-runtime/0.5.11409/lib/types/private/methods/_methods.rb#257 - def type_aliases(*args, **_arg1, &blk); end - - private - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#678 - sig { overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_body(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/namespace.rb#769 - sig { params(object: ::Parlour::RbiGenerator::RbiObject).void } - def move_next_comments(object); end -end - -# For backwards compatibility. -# Before Parlour 5.0, Parlour::Options was Parlour::RbiGenerator::Options. -# -# source://parlour//lib/parlour/rbi_generator.rb#7 -Parlour::RbiGenerator::Options = Parlour::Options - -# Represents a method parameter with a Sorbet type signature. -# -# source://parlour//lib/parlour/rbi_generator/parameter.rb#6 -class Parlour::RbiGenerator::Parameter - # source://parlour//lib/parlour/rbi_generator/parameter.rb#37 - sig do - params( - name: ::String, - type: T.nilable(T.any(::Parlour::Types::Type, ::String)), - default: T.nilable(::String) - ).void - end - def initialize(name, type: T.unsafe(nil), default: T.unsafe(nil)); end - - # source://parlour//lib/parlour/rbi_generator/parameter.rb#56 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbi_generator/parameter.rb#95 - sig { returns(T.nilable(::String)) } - def default; end - - # source://parlour//lib/parlour/rbi_generator/parameter.rb#139 - sig { returns(::String) } - def describe_in_method; end - - # source://parlour//lib/parlour/rbi_generator/parameter.rb#134 - sig { void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/parameter.rb#101 - sig { returns(::Symbol) } - def kind; end - - # source://parlour//lib/parlour/rbi_generator/parameter.rb#68 - sig { returns(::String) } - def name; end - - # source://parlour//lib/parlour/rbi_generator/parameter.rb#75 - sig { returns(::String) } - def name_without_kind; end - - # source://parlour//lib/parlour/rbi_generator/parameter.rb#107 - sig { returns(::String) } - def to_def_param; end - - # source://parlour//lib/parlour/rbi_generator/parameter.rb#121 - sig { returns(::String) } - def to_sig_param; end - - # source://parlour//lib/parlour/rbi_generator/parameter.rb#88 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def type; end -end - -# A mapping of {kind} values to the characteristic prefixes each kind has. -# -# source://parlour//lib/parlour/rbi_generator/parameter.rb#126 -Parlour::RbiGenerator::Parameter::PREFIXES = T.let(T.unsafe(nil), Hash) - -# An abstract class which is subclassed by any classes which can generate -# entire lines of an RBI, such as {Namespace} and {Method}. (As an example, -# {Parameter} is _not_ a subclass because it does not generate lines, only -# segments of definition and signature lines.) -# -# @abstract -# -# source://parlour//lib/parlour/rbi_generator/rbi_object.rb#9 -class Parlour::RbiGenerator::RbiObject < ::Parlour::TypedObject - abstract! - - # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#19 - sig { params(generator: ::Parlour::Generator, name: ::String).void } - def initialize(generator, name); end - - # @abstract - # - # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#79 - sig { abstract.void } - def generalize_from_rbi!; end - - # @abstract - # - # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#42 - sig { abstract.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbi(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#28 - sig { returns(::Parlour::Generator) } - def generator; end - - # @abstract - # - # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#70 - sig { abstract.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # @abstract - # - # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#56 - sig { abstract.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end -end - -# Represents an struct definition; that is, a class which subclasses -# +T::Struct+ and declares `prop` members. -# -# source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#6 -class Parlour::RbiGenerator::StructClassNamespace < ::Parlour::RbiGenerator::ClassNamespace - extend T::Generic - - Child = type_member { { fixed: Parlour::RbiGenerator::RbiObject } } - - # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#33 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - final: T::Boolean, - sealed: T::Boolean, - props: T::Array[::Parlour::RbiGenerator::StructProp], - abstract: T::Boolean, - block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::StructClassNamespace).void) - ).void - end - def initialize(generator, name, final, sealed, props, abstract, &block); end - - # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#114 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#107 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#55 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_body(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#95 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#77 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#41 - sig { returns(T::Array[::Parlour::RbiGenerator::StructProp]) } - def props; end -end - -# Represents a +T::Struct+ property. -# -# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#5 -class Parlour::RbiGenerator::StructProp - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#33 - sig do - params( - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - optional: T.nilable(T.any(::Symbol, T::Boolean)), - enum: T.nilable(::String), - dont_store: T.nilable(T::Boolean), - foreign: T.nilable(::String), - default: T.nilable(::String), - factory: T.nilable(::String), - immutable: T.nilable(T::Boolean), - array: T.nilable(::String), - override: T.nilable(T::Boolean), - redaction: T.nilable(::String) - ).void - end - def initialize(name, type, optional: T.unsafe(nil), enum: T.unsafe(nil), dont_store: T.unsafe(nil), foreign: T.unsafe(nil), default: T.unsafe(nil), factory: T.unsafe(nil), immutable: T.unsafe(nil), array: T.unsafe(nil), override: T.unsafe(nil), redaction: T.unsafe(nil)); end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#57 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#106 - sig { returns(T.nilable(::String)) } - def array; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#97 - sig { returns(T.nilable(::String)) } - def default; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#91 - sig { returns(T.nilable(T::Boolean)) } - def dont_store; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#88 - sig { returns(T.nilable(::String)) } - def enum; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#100 - sig { returns(T.nilable(::String)) } - def factory; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#94 - sig { returns(T.nilable(::String)) } - def foreign; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#134 - sig { void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#103 - sig { returns(T.nilable(T::Boolean)) } - def immutable; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#77 - sig { returns(::String) } - def name; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#85 - sig { returns(T.nilable(T.any(::Symbol, T::Boolean))) } - def optional; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#109 - sig { returns(T.nilable(T::Boolean)) } - def override; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#112 - sig { returns(T.nilable(::String)) } - def redaction; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#122 - sig { returns(::String) } - def to_prop_call; end - - # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#82 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def type; end -end - -# The optional properties available on instances of this class. -# -# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#115 -Parlour::RbiGenerator::StructProp::EXTRA_PROPERTIES = T.let(T.unsafe(nil), Array) - -# Represents a type alias. -# -# source://parlour//lib/parlour/rbi_generator/type_alias.rb#5 -class Parlour::RbiGenerator::TypeAlias < ::Parlour::RbiGenerator::RbiObject - # source://parlour//lib/parlour/rbi_generator/type_alias.rb#18 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::TypeAlias).void) - ).void - end - def initialize(generator, name:, type:, &block); end - - # source://parlour//lib/parlour/rbi_generator/type_alias.rb#34 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbi_generator/type_alias.rb#93 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbi_generator/type_alias.rb#88 - sig { override.void } - def generalize_from_rbi!; end - - # source://parlour//lib/parlour/rbi_generator/type_alias.rb#49 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbi(indent_level, options); end - - # source://parlour//lib/parlour/rbi_generator/type_alias.rb#83 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbi_generator/type_alias.rb#66 - sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbi_generator/type_alias.rb#26 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def type; end -end - -# The RBS generator. -# -# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#3 -class Parlour::RbsGenerator < ::Parlour::Generator - # @return [RbsGenerator] a new instance of RbsGenerator - # - # source://parlour//lib/parlour/rbs_generator.rb#5 - def initialize(**hash); end - - # source://parlour//lib/parlour/rbs_generator.rb#19 - sig { overridable.returns(::String) } - def rbs; end - - # source://parlour//lib/parlour/rbs_generator.rb#13 - sig { overridable.returns(Parlour::RbsGenerator::Namespace) } - def root; end -end - -# Represents miscellaneous Ruby code. -# -# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#5 -class Parlour::RbsGenerator::Arbitrary < ::Parlour::RbsGenerator::RbsObject - # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#17 - sig do - params( - generator: ::Parlour::Generator, - code: ::String, - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Arbitrary).void) - ).void - end - def initialize(generator, code: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#33 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#25 - sig { returns(::String) } - def code; end - - # @return [String] - # - # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#25 - def code=(_arg0); end - - # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#84 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#48 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#79 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#63 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } - def mergeable?(others); end -end - -# Represents an attribute reader, writer or accessor. -# -# source://parlour//lib/parlour/rbs_generator/attribute.rb#5 -class Parlour::RbsGenerator::Attribute < ::Parlour::RbsGenerator::Method - # source://parlour//lib/parlour/rbs_generator/attribute.rb#27 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - kind: ::Symbol, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Attribute).void) - ).void - end - def initialize(generator, name, kind, type, &block); end - - # source://parlour//lib/parlour/rbs_generator/attribute.rb#75 - sig { override.params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbs_generator/attribute.rb#82 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/attribute.rb#62 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/attribute.rb#45 - sig { returns(::Symbol) } - def kind; end - - # source://parlour//lib/parlour/rbs_generator/attribute.rb#49 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def type; end -end - -# Represents a block in a method signature. -# (This is not an RbsObject because it doesn't generate a full line.) -# -# source://parlour//lib/parlour/rbs_generator/block.rb#6 -class Parlour::RbsGenerator::Block - # source://parlour//lib/parlour/rbs_generator/block.rb#14 - sig { params(type: ::Parlour::Types::Proc, required: T::Boolean).void } - def initialize(type, required); end - - # source://parlour//lib/parlour/rbs_generator/block.rb#25 - sig { overridable.params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbs_generator/block.rb#44 - sig { params(options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(options); end - - # source://parlour//lib/parlour/rbs_generator/block.rb#37 - sig { returns(T::Boolean) } - def required; end - - # source://parlour//lib/parlour/rbs_generator/block.rb#32 - sig { returns(::Parlour::Types::Proc) } - def type; end -end - -# Represents a class definition. -# -# source://parlour//lib/parlour/rbs_generator/class_namespace.rb#5 -class Parlour::RbsGenerator::ClassNamespace < ::Parlour::RbsGenerator::Namespace - extend T::Generic - - Child = type_member { { fixed: Parlour::RbsGenerator::RbsObject } } - - # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#27 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - superclass: T.nilable(T.any(::Parlour::Types::Type, ::String)), - block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::ClassNamespace).void) - ).void - end - def initialize(generator, name, superclass, &block); end - - # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#97 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#38 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#85 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#66 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#52 - sig { returns(T.nilable(T.any(::Parlour::Types::Type, ::String))) } - def superclass; end -end - -# Represents a constant definition. -# -# source://parlour//lib/parlour/rbs_generator/constant.rb#5 -class Parlour::RbsGenerator::Constant < ::Parlour::RbsGenerator::RbsObject - # source://parlour//lib/parlour/rbs_generator/constant.rb#19 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Constant).void) - ).void - end - def initialize(generator, name, type:, &block); end - - # source://parlour//lib/parlour/rbs_generator/constant.rb#35 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbs_generator/constant.rb#87 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/constant.rb#50 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/constant.rb#82 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbs_generator/constant.rb#65 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbs_generator/constant.rb#27 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def type; end -end - -# Represents an +extend+ call. -# -# source://parlour//lib/parlour/rbs_generator/extend.rb#5 -class Parlour::RbsGenerator::Extend < ::Parlour::RbsGenerator::RbsObject - # source://parlour//lib/parlour/rbs_generator/extend.rb#16 - sig do - params( - generator: ::Parlour::Generator, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Extend).void) - ).void - end - def initialize(generator, type:, &block); end - - # source://parlour//lib/parlour/rbs_generator/extend.rb#28 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbs_generator/extend.rb#84 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/extend.rb#47 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/extend.rb#79 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbs_generator/extend.rb#62 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbs_generator/extend.rb#34 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def type; end -end - -# Represents an +include+ call. -# -# source://parlour//lib/parlour/rbs_generator/include.rb#5 -class Parlour::RbsGenerator::Include < ::Parlour::RbsGenerator::RbsObject - # source://parlour//lib/parlour/rbs_generator/include.rb#16 - sig do - params( - generator: ::Parlour::Generator, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Include).void) - ).void - end - def initialize(generator, type:, &block); end - - # source://parlour//lib/parlour/rbs_generator/include.rb#28 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbs_generator/include.rb#84 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/include.rb#47 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/include.rb#79 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbs_generator/include.rb#62 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbs_generator/include.rb#34 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def type; end -end - -# Represents an interface definition. -# -# source://parlour//lib/parlour/rbs_generator/interface_namespace.rb#5 -class Parlour::RbsGenerator::InterfaceNamespace < ::Parlour::RbsGenerator::Namespace - extend T::Generic - - Child = type_member { { fixed: Parlour::RbsGenerator::RbsObject } } - - # source://parlour//lib/parlour/rbs_generator/interface_namespace.rb#29 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/interface_namespace.rb#21 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end -end - -# Represents a method definition. -# -# source://parlour//lib/parlour/rbs_generator/method.rb#5 -class Parlour::RbsGenerator::Method < ::Parlour::RbsGenerator::RbsObject - # source://parlour//lib/parlour/rbs_generator/method.rb#29 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - signatures: T::Array[::Parlour::RbsGenerator::MethodSignature], - class_method: T::Boolean, - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Method).void) - ).void - end - def initialize(generator, name, signatures, class_method: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbs_generator/method.rb#42 - sig { overridable.params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbs_generator/method.rb#58 - sig { returns(T::Boolean) } - def class_method; end - - # source://parlour//lib/parlour/rbs_generator/method.rb#137 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/method.rb#71 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/method.rb#132 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbs_generator/method.rb#115 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbs_generator/method.rb#52 - sig { returns(T::Array[::Parlour::RbsGenerator::MethodSignature]) } - def signatures; end -end - -# Represents one signature in a method definition. -# (This is not an RbsObject because it doesn't generate a full line.) -# -# source://parlour//lib/parlour/rbs_generator/method_signature.rb#6 -class Parlour::RbsGenerator::MethodSignature - # source://parlour//lib/parlour/rbs_generator/method_signature.rb#25 - sig do - params( - parameters: T::Array[::Parlour::RbsGenerator::Parameter], - return_type: T.nilable(T.any(::Parlour::Types::Type, ::String)), - block: T.nilable(::Parlour::RbsGenerator::Block), - type_parameters: T.nilable(T::Array[::Symbol]) - ).void - end - def initialize(parameters, return_type = T.unsafe(nil), block: T.unsafe(nil), type_parameters: T.unsafe(nil)); end - - # source://parlour//lib/parlour/rbs_generator/method_signature.rb#38 - sig { overridable.params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbs_generator/method_signature.rb#59 - sig { returns(T.nilable(::Parlour::RbsGenerator::Block)) } - def block; end - - # source://parlour//lib/parlour/rbs_generator/method_signature.rb#104 - sig { returns(::String) } - def describe_in_method; end - - # source://parlour//lib/parlour/rbs_generator/method_signature.rb#71 - sig { params(options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(options); end - - # source://parlour//lib/parlour/rbs_generator/method_signature.rb#49 - sig { returns(T::Array[::Parlour::RbsGenerator::Parameter]) } - def parameters; end - - # source://parlour//lib/parlour/rbs_generator/method_signature.rb#54 - sig { returns(T.nilable(T.any(::Parlour::Types::Type, ::String))) } - def return_type; end - - # source://parlour//lib/parlour/rbs_generator/method_signature.rb#64 - sig { returns(T::Array[::Symbol]) } - def type_parameters; end -end - -# Represents a module definition. -# -# source://parlour//lib/parlour/rbs_generator/module_namespace.rb#5 -class Parlour::RbsGenerator::ModuleNamespace < ::Parlour::RbsGenerator::Namespace - extend T::Generic - - Child = type_member { { fixed: Parlour::RbsGenerator::RbsObject } } - - # source://parlour//lib/parlour/rbs_generator/module_namespace.rb#29 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/module_namespace.rb#21 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end -end - -# A generic namespace. This shouldn't be used, except as the type of -# {RbsGenerator#root}. -# -# source://parlour//lib/parlour/rbs_generator/namespace.rb#6 -class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject - extend T::Generic - include ::Parlour::Mixin::Searchable - - Child = type_member { { fixed: Parlour::RbsGenerator::RbsObject } } - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#42 - sig do - params( - generator: ::Parlour::Generator, - name: T.nilable(::String), - block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Namespace).void) - ).void - end - def initialize(generator, name = T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#139 - sig { params(comment: T.any(::String, T::Array[::String])).void } - def add_comment_to_next_child(comment); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#80 - sig { returns(T::Array[::Parlour::RbsGenerator::TypeAlias]) } - def aliases; end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#52 - sig { override.returns(T::Array[::Parlour::RbsGenerator::RbsObject]) } - def children; end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#91 - sig { returns(T::Array[::Parlour::RbsGenerator::Constant]) } - def constants; end - - # Creates a new arbitrary code section. - # You should rarely have to use this! - # - # @param code [String] The code to insert. - # @param block A block which the new instance yields itself to. - # @return [RbsGenerator::Arbitrary] - # - # source://parlour//lib/parlour/rbs_generator/namespace.rb#357 - def create_arbitrary(code:, &block); end - - # @param name [String] - # @param kind [Symbol] - # @param type [Types::TypeLike] - # @param block [T.proc.params(x: Attribute).void, nil] - # @return [Attribute] - # - # source://sorbet-runtime/0.5.11409/lib/types/private/methods/_methods.rb#257 - def create_attr(*args, **_arg1, &blk); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#347 - sig do - params( - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Attribute).void) - ).returns(::Parlour::RbsGenerator::Attribute) - end - def create_attr_accessor(name, type:, &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#309 - sig do - params( - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Attribute).void) - ).returns(::Parlour::RbsGenerator::Attribute) - end - def create_attr_reader(name, type:, &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#328 - sig do - params( - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Attribute).void) - ).returns(::Parlour::RbsGenerator::Attribute) - end - def create_attr_writer(name, type:, &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#280 - sig do - params( - name: ::String, - kind: ::Symbol, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Attribute).void) - ).returns(::Parlour::RbsGenerator::Attribute) - end - def create_attribute(name, kind:, type:, &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#169 - sig do - params( - name: ::String, - superclass: T.nilable(T.any(::Parlour::Types::Type, ::String)), - block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::ClassNamespace).void) - ).returns(Parlour::RbsGenerator::ClassNamespace) - end - def create_class(name, superclass: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#450 - sig do - params( - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Constant).void) - ).returns(::Parlour::RbsGenerator::Constant) - end - def create_constant(name, type:, &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#377 - sig do - params( - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Extend).void) - ).returns(::Parlour::RbsGenerator::Extend) - end - def create_extend(type, &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#396 - sig do - params( - extendables: T::Array[T.any(::Parlour::Types::Type, ::String)] - ).returns(T::Array[::Parlour::RbsGenerator::Extend]) - end - def create_extends(extendables); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#413 - sig do - params( - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Include).void) - ).returns(::Parlour::RbsGenerator::Include) - end - def create_include(type, &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#432 - sig do - params( - includables: T::Array[T.any(::Parlour::Types::Type, ::String)] - ).returns(T::Array[::Parlour::RbsGenerator::Include]) - end - def create_includes(includables); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#211 - sig do - params( - name: ::String, - block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Namespace).void) - ).returns(Parlour::RbsGenerator::InterfaceNamespace) - end - def create_interface(name, &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#236 - sig do - params( - name: ::String, - signatures: T.nilable(T::Array[::Parlour::RbsGenerator::MethodSignature]), - class_method: T::Boolean, - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Method).void) - ).returns(::Parlour::RbsGenerator::Method) - end - def create_method(name, signatures = T.unsafe(nil), class_method: T.unsafe(nil), &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#190 - sig do - params( - name: ::String, - block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Namespace).void) - ).returns(Parlour::RbsGenerator::ModuleNamespace) - end - def create_module(name, &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#472 - sig do - params( - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::TypeAlias).void) - ).returns(::Parlour::RbsGenerator::TypeAlias) - end - def create_type_alias(name, type:, &block); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#525 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#60 - sig { returns(T::Array[::Parlour::RbsGenerator::Extend]) } - def extends; end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#21 - sig { override.overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#70 - sig { returns(T::Array[::Parlour::RbsGenerator::Include]) } - def includes; end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#515 - sig { override.overridable.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#497 - sig { override.overridable.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#104 - sig { params(object: T.untyped, block: T.proc.params(x: Parlour::RbsGenerator::Namespace).void).void } - def path(object, &block); end - - # @return [Array] - # - # source://sorbet-runtime/0.5.11409/lib/types/private/methods/_methods.rb#257 - def type_aliases(*args, **_arg1, &blk); end - - private - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#545 - sig { overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_body(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/namespace.rb#621 - sig { params(object: ::Parlour::RbsGenerator::RbsObject).void } - def move_next_comments(object); end -end - -# Represents a method parameter with a Sorbet type signature. -# -# source://parlour//lib/parlour/rbs_generator/parameter.rb#5 -class Parlour::RbsGenerator::Parameter - # source://parlour//lib/parlour/rbs_generator/parameter.rb#37 - sig { params(name: ::String, type: T.nilable(T.any(::Parlour::Types::Type, ::String)), required: T::Boolean).void } - def initialize(name, type: T.unsafe(nil), required: T.unsafe(nil)); end - - # source://parlour//lib/parlour/rbs_generator/parameter.rb#56 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbs_generator/parameter.rb#98 - sig { returns(::Symbol) } - def kind; end - - # source://parlour//lib/parlour/rbs_generator/parameter.rb#68 - sig { returns(::String) } - def name; end - - # source://parlour//lib/parlour/rbs_generator/parameter.rb#75 - sig { returns(::String) } - def name_without_kind; end - - # source://parlour//lib/parlour/rbs_generator/parameter.rb#92 - sig { returns(T::Boolean) } - def required; end - - # source://parlour//lib/parlour/rbs_generator/parameter.rb#119 - sig { returns(::String) } - def to_rbs_param; end - - # source://parlour//lib/parlour/rbs_generator/parameter.rb#87 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def type; end -end - -# A mapping of {kind} values to the characteristic prefixes each kind has. -# -# source://parlour//lib/parlour/rbs_generator/parameter.rb#109 -Parlour::RbsGenerator::Parameter::PREFIXES = T.let(T.unsafe(nil), Hash) - -# An array of reserved keywords in RBS which may be used as parameter -# names in standard Ruby. -# TODO: probably incomplete -# -# source://parlour//lib/parlour/rbs_generator/parameter.rb#103 -Parlour::RbsGenerator::Parameter::RBS_KEYWORDS = T.let(T.unsafe(nil), Array) - -# An abstract class which is subclassed by any classes which can generate -# entire lines of an RBS, such as {Namespace} and {Method}. (As an example, -# {Parameter} is _not_ a subclass because it does not generate lines, only -# segments of definition lines.) -# -# @abstract -# -# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#9 -class Parlour::RbsGenerator::RbsObject < ::Parlour::TypedObject - abstract! - - # source://parlour//lib/parlour/rbs_generator/rbs_object.rb#19 - sig { params(generator: ::Parlour::Generator, name: ::String).void } - def initialize(generator, name); end - - # @abstract - # - # source://parlour//lib/parlour/rbs_generator/rbs_object.rb#42 - sig { abstract.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/rbs_object.rb#28 - sig { returns(::Parlour::Generator) } - def generator; end - - # @abstract - # - # source://parlour//lib/parlour/rbs_generator/rbs_object.rb#70 - sig { abstract.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } - def merge_into_self(others); end - - # @abstract - # - # source://parlour//lib/parlour/rbs_generator/rbs_object.rb#56 - sig { abstract.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } - def mergeable?(others); end -end - -# Represents a type alias. -# -# source://parlour//lib/parlour/rbs_generator/type_alias.rb#5 -class Parlour::RbsGenerator::TypeAlias < ::Parlour::RbsGenerator::RbsObject - # source://parlour//lib/parlour/rbs_generator/type_alias.rb#18 - sig do - params( - generator: ::Parlour::Generator, - name: ::String, - type: T.any(::Parlour::Types::Type, ::String), - block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::TypeAlias).void) - ).void - end - def initialize(generator, name:, type:, &block); end - - # source://parlour//lib/parlour/rbs_generator/type_alias.rb#34 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/rbs_generator/type_alias.rb#88 - sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/rbs_generator/type_alias.rb#49 - sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_rbs(indent_level, options); end - - # source://parlour//lib/parlour/rbs_generator/type_alias.rb#83 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } - def merge_into_self(others); end - - # source://parlour//lib/parlour/rbs_generator/type_alias.rb#66 - sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } - def mergeable?(others); end - - # source://parlour//lib/parlour/rbs_generator/type_alias.rb#26 - sig { returns(T.any(::Parlour::Types::Type, ::String)) } - def type; end -end - -# source://parlour//lib/parlour/type_loader.rb#7 -module Parlour::TypeLoader - class << self - # source://parlour//lib/parlour/type_loader.rb#29 - sig do - params( - filename: ::String, - generator: T.nilable(::Parlour::RbiGenerator) - ).returns(Parlour::RbiGenerator::Namespace) - end - def load_file(filename, generator: T.unsafe(nil)); end - - # source://parlour//lib/parlour/type_loader.rb#54 - sig do - params( - root: ::String, - inclusions: T::Array[::String], - exclusions: T::Array[::String], - generator: T.nilable(::Parlour::RbiGenerator) - ).returns(Parlour::RbiGenerator::Namespace) - end - def load_project(root, inclusions: T.unsafe(nil), exclusions: T.unsafe(nil), generator: T.unsafe(nil)); end - - # TODO: make this into a class which stores configuration and passes it to - # all typeparsers - # - # source://parlour//lib/parlour/type_loader.rb#20 - sig do - params( - source: ::String, - filename: T.nilable(::String), - generator: T.nilable(::Parlour::RbiGenerator) - ).returns(Parlour::RbiGenerator::Namespace) - end - def load_source(source, filename = T.unsafe(nil), generator: T.unsafe(nil)); end - end -end - -# Parses Ruby source to find Sorbet type signatures. -# -# source://parlour//lib/parlour/type_parser.rb#17 -class Parlour::TypeParser - # source://parlour//lib/parlour/type_parser.rb#95 - sig do - params( - ast: ::Parser::AST::Node, - unknown_node_errors: T::Boolean, - generator: T.nilable(::Parlour::RbiGenerator) - ).void - end - def initialize(ast, unknown_node_errors: T.unsafe(nil), generator: T.unsafe(nil)); end - - # source://parlour//lib/parlour/type_parser.rb#119 - sig { returns(::Parser::AST::Node) } - def ast; end - - # @return [Parser::AST::Node] - # - # source://parlour//lib/parlour/type_parser.rb#119 - def ast=(_arg0); end - - # source://parlour//lib/parlour/type_parser.rb#128 - sig { returns(::Parlour::RbiGenerator) } - def generator; end - - # @return [RbiGenerator] - # - # source://parlour//lib/parlour/type_parser.rb#128 - def generator=(_arg0); end - - # Parses the entire source file and returns the resulting root namespace. - # - # source://parlour//lib/parlour/type_parser.rb#134 - sig { returns(Parlour::RbiGenerator::Namespace) } - def parse_all; end - - # source://parlour//lib/parlour/type_parser.rb#649 - sig do - params( - path: ::Parlour::TypeParser::NodePath, - is_within_eigenclass: T::Boolean - ).returns(T::Array[::Parlour::RbiGenerator::Method]) - end - def parse_method_into_methods(path, is_within_eigenclass: T.unsafe(nil)); end - - # source://parlour//lib/parlour/type_parser.rb#754 - sig { params(node: ::Parser::AST::Node).returns(::Parlour::Types::Type) } - def parse_node_to_type(node); end - - # Given a path to a node in the AST, parses the object definitions it - # represents and returns it, recursing to any child namespaces and parsing - # any methods within. - # - # If the node directly represents several nodes, such as being a - # (begin ...) node, they are all returned. - # - # source://parlour//lib/parlour/type_parser.rb#152 - sig do - params( - path: ::Parlour::TypeParser::NodePath, - is_within_eigenclass: T::Boolean - ).returns(T::Array[::Parlour::RbiGenerator::RbiObject]) - end - def parse_path_to_object(path, is_within_eigenclass: T.unsafe(nil)); end - - # source://parlour//lib/parlour/type_parser.rb#496 - sig do - params( - path: ::Parlour::TypeParser::NodePath, - is_within_eigenclass: T::Boolean - ).returns(T::Array[::Parlour::RbiGenerator::Method]) - end - def parse_sig_into_methods(path, is_within_eigenclass: T.unsafe(nil)); end - - # source://parlour//lib/parlour/type_parser.rb#418 - sig { params(path: ::Parlour::TypeParser::NodePath).returns(::Parlour::TypeParser::IntermediateSig) } - def parse_sig_into_sig(path); end - - # source://parlour//lib/parlour/type_parser.rb#124 - sig { returns(T::Boolean) } - def unknown_node_errors; end - - protected - - # source://parlour//lib/parlour/type_parser.rb#971 - sig { params(node: T.nilable(::Parser::AST::Node), modifier: ::Symbol).returns(T::Boolean) } - def body_has_modifier?(node, modifier); end - - # source://parlour//lib/parlour/type_parser.rb#986 - sig { params(node: ::Parser::AST::Node).returns([T::Array[::String], T::Array[::String]]) } - def body_includes_and_extends(node); end - - # source://parlour//lib/parlour/type_parser.rb#911 - sig { params(node: T.nilable(::Parser::AST::Node)).returns(T::Array[::Symbol]) } - def constant_names(node); end - - # source://parlour//lib/parlour/type_parser.rb#953 - sig { params(node: T.nilable(::Parser::AST::Node)).returns(T.nilable(::String)) } - def node_to_s(node); end - - # @raise [ParseError.new(buffer, range)] - # - # source://parlour//lib/parlour/type_parser.rb#1010 - sig { params(desc: ::String, node: T.any(::Parlour::TypeParser::NodePath, ::Parser::AST::Node)).returns(T.noreturn) } - def parse_err(desc, node); end - - # source://parlour//lib/parlour/type_parser.rb#936 - sig { params(path: ::Parlour::TypeParser::NodePath).returns(T::Boolean) } - def previous_sibling_sig_node?(path); end - - # source://parlour//lib/parlour/type_parser.rb#923 - sig { params(node: ::Parser::AST::Node).returns(T::Boolean) } - def sig_node?(node); end - - # source://parlour//lib/parlour/type_parser.rb#893 - sig { params(msg: ::String, node: ::Parser::AST::Node).void } - def warning(msg, node); end - - # @raise [ArgumentError] - # - # source://parlour//lib/parlour/type_parser.rb#1043 - sig do - type_parameters(:A, :B) - .params( - a: T::Array[T.type_parameter(:A)], - fa: T.proc.params(item: T.type_parameter(:A)).returns(T.untyped), - b: T::Array[T.type_parameter(:B)], - fb: T.proc.params(item: T.type_parameter(:B)).returns(T.untyped) - ).returns(T::Array[[T.type_parameter(:A), T.type_parameter(:B)]]) - end - def zip_by(a, fa, b, fb); end - - class << self - # source://parlour//lib/parlour/type_parser.rb#108 - sig do - params( - filename: ::String, - source: ::String, - generator: T.nilable(::Parlour::RbiGenerator) - ).returns(::Parlour::TypeParser) - end - def from_source(filename, source, generator: T.unsafe(nil)); end - - # source://parlour//lib/parlour/type_parser.rb#743 - sig { params(str: ::String).returns(::Parlour::Types::Type) } - def parse_single_type(str); end - end -end - -# A parsed sig, not associated with a method. -# -# source://parlour//lib/parlour/type_parser.rb#399 -class Parlour::TypeParser::IntermediateSig < ::T::Struct - prop :type_parameters, T.nilable(T::Array[::Symbol]) - prop :overridable, T::Boolean - prop :override, T::Boolean - prop :abstract, T::Boolean - prop :final, T::Boolean - prop :return_type, T.nilable(::String) - prop :params, T.nilable(T::Array[::Parser::AST::Node]) - - class << self - # source://sorbet-runtime/0.5.11409/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# Represents a path of indices which can be traversed to reach a specific -# node in an AST. -# -# source://parlour//lib/parlour/type_parser.rb#20 -class Parlour::TypeParser::NodePath - # source://parlour//lib/parlour/type_parser.rb#31 - sig { params(indices: T::Array[::Integer]).void } - def initialize(indices); end - - # source://parlour//lib/parlour/type_parser.rb#48 - sig { params(index: ::Integer).returns(::Parlour::TypeParser::NodePath) } - def child(index); end - - # source://parlour//lib/parlour/type_parser.rb#25 - sig { returns(T::Array[::Integer]) } - def indices; end - - # source://parlour//lib/parlour/type_parser.rb#37 - sig { returns(::Parlour::TypeParser::NodePath) } - def parent; end - - # source://parlour//lib/parlour/type_parser.rb#57 - sig { params(offset: ::Integer).returns(::Parlour::TypeParser::NodePath) } - def sibling(offset); end - - # source://parlour//lib/parlour/type_parser.rb#74 - sig { params(start: ::Parser::AST::Node).returns(::Parser::AST::Node) } - def traverse(start); end -end - -# A generic superclass of all objects which form part of type definitions in, -# specific formats, such as RbiObject and RbsObject. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://parlour//lib/parlour/typed_object.rb#5 -class Parlour::TypedObject - abstract! - - # source://parlour//lib/parlour/typed_object.rb#12 - sig { params(name: ::String).void } - def initialize(name); end - - # source://parlour//lib/parlour/typed_object.rb#50 - sig { params(comment: T.any(::String, T::Array[::String])).void } - def add_comment(comment); end - - # @param comment [String, Array] - # @return [void] - # - # source://sorbet-runtime/0.5.11409/lib/types/private/methods/_methods.rb#257 - def add_comments(*args, **_arg1, &blk); end - - # source://parlour//lib/parlour/typed_object.rb#32 - sig { returns(T::Array[::String]) } - def comments; end - - # source://parlour//lib/parlour/typed_object.rb#65 - sig { returns(::String) } - def describe; end - - # source://parlour//lib/parlour/typed_object.rb#116 - sig { params(tree: T.nilable(::Parlour::Debugging::Tree)).returns(::String) } - def describe_tree(tree: T.unsafe(nil)); end - - # source://parlour//lib/parlour/typed_object.rb#21 - sig { returns(T.nilable(::Parlour::Plugin)) } - def generated_by; end - - # @return [String] - # - # source://sorbet-runtime/0.5.11409/lib/types/private/methods/_methods.rb#257 - def inspect(*args, **_arg1, &blk); end - - # source://parlour//lib/parlour/typed_object.rb#26 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://sorbet-runtime/0.5.11409/lib/types/private/methods/_methods.rb#257 - def to_s(*args, **_arg1, &blk); end - - protected - - # @abstract - # - # source://parlour//lib/parlour/typed_object.rb#153 - sig { abstract.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } - def describe_attrs; end - - # source://parlour//lib/parlour/typed_object.rb#166 - sig { params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } - def generate_comments(indent_level, options); end -end - -# Contains structured types which can be used in type signatures. -# -# source://parlour//lib/parlour/types.rb#5 -module Parlour::Types; end - -# An array with known element types. -# -# source://parlour//lib/parlour/types.rb#269 -class Parlour::Types::Array < ::Parlour::Types::SingleElementCollection - # source://parlour//lib/parlour/types.rb#276 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#271 - sig { override.returns(::String) } - def collection_name; end -end - -# Type for a boolean. -# -# source://parlour//lib/parlour/types.rb#435 -class Parlour::Types::Boolean < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#437 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#452 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#442 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#447 - sig { override.returns(::String) } - def generate_rbs; end -end - -# A type which represents the class of a type, rather than an instance. -# For example, "String" means an instance of String, but "Class(String)" -# means the actual String class. -# -# source://parlour//lib/parlour/types.rb#404 -class Parlour::Types::Class < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#406 - sig { params(type: T.any(::Parlour::Types::Type, ::String)).void } - def initialize(type); end - - # source://parlour//lib/parlour/types.rb#411 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#429 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#419 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#424 - sig { override.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#416 - sig { returns(::Parlour::Types::Type) } - def type; end -end - -# An enumerable with known element types. -# -# source://parlour//lib/parlour/types.rb#308 -class Parlour::Types::Enumerable < ::Parlour::Types::SingleElementCollection - # source://parlour//lib/parlour/types.rb#315 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#310 - sig { override.returns(::String) } - def collection_name; end -end - -# An enumerator with known element types. -# -# source://parlour//lib/parlour/types.rb#321 -class Parlour::Types::Enumerator < ::Parlour::Types::SingleElementCollection - # source://parlour//lib/parlour/types.rb#328 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#323 - sig { override.returns(::String) } - def collection_name; end -end - -# A user-defined generic class with an arbitrary number of type -# parameters. This class assumes at least one type_param is -# provided, otherwise output will have empty type param lists. -# -# source://parlour//lib/parlour/types.rb#202 -class Parlour::Types::Generic < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#204 - sig do - params( - type: T.any(::Parlour::Types::Type, ::String), - type_params: T::Array[T.any(::Parlour::Types::Type, ::String)] - ).void - end - def initialize(type, type_params); end - - # source://parlour//lib/parlour/types.rb#210 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#233 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#223 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#228 - sig { override.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#217 - sig { returns(::Parlour::Types::Type) } - def type; end - - # source://parlour//lib/parlour/types.rb#220 - sig { returns(T::Array[::Parlour::Types::Type]) } - def type_params; end -end - -# A hash with known key and value types. -# -# source://parlour//lib/parlour/types.rb#334 -class Parlour::Types::Hash < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#336 - sig { params(key: T.any(::Parlour::Types::Type, ::String), value: T.any(::Parlour::Types::Type, ::String)).void } - def initialize(key, value); end - - # source://parlour//lib/parlour/types.rb#342 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#363 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#353 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#358 - sig { override.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#347 - sig { returns(::Parlour::Types::Type) } - def key; end - - # source://parlour//lib/parlour/types.rb#350 - sig { returns(::Parlour::Types::Type) } - def value; end -end - -# A type which matches all of the wrapped types. -# -# source://parlour//lib/parlour/types.rb#138 -class Parlour::Types::Intersection < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#140 - sig { params(types: T::Array[T.any(::Parlour::Types::Type, ::String)]).void } - def initialize(types); end - - # source://parlour//lib/parlour/types.rb#145 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#163 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#153 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#158 - sig { override.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#150 - sig { returns(T::Array[::Parlour::Types::Type]) } - def types; end -end - -# A type which can be either the wrapped type, or nil. -# -# source://parlour//lib/parlour/types.rb#76 -class Parlour::Types::Nilable < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#78 - sig { params(type: T.any(::Parlour::Types::Type, ::String)).void } - def initialize(type); end - - # source://parlour//lib/parlour/types.rb#83 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#101 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#91 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#96 - sig { override.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#88 - sig { returns(::Parlour::Types::Type) } - def type; end -end - -# A type which can be called as a function. -# -# source://parlour//lib/parlour/types.rb#504 -class Parlour::Types::Proc < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#533 - sig do - params( - parameters: T::Array[::Parlour::Types::Proc::Parameter], - return_type: T.nilable(T.any(::Parlour::Types::Type, ::String)) - ).void - end - def initialize(parameters, return_type); end - - # source://parlour//lib/parlour/types.rb#539 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#568 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#550 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#560 - sig { override.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#544 - sig { returns(T::Array[::Parlour::Types::Proc::Parameter]) } - def parameters; end - - # source://parlour//lib/parlour/types.rb#547 - sig { returns(T.nilable(::Parlour::Types::Type)) } - def return_type; end -end - -# A parameter to a proc. -# -# source://parlour//lib/parlour/types.rb#506 -class Parlour::Types::Proc::Parameter - # source://parlour//lib/parlour/types.rb#510 - sig { params(name: ::String, type: T.any(::Parlour::Types::Type, ::String), default: T.nilable(::String)).void } - def initialize(name, type, default = T.unsafe(nil)); end - - # source://parlour//lib/parlour/types.rb#526 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#523 - sig { returns(T.nilable(::String)) } - def default; end - - # source://parlour//lib/parlour/types.rb#517 - sig { returns(::String) } - def name; end - - # source://parlour//lib/parlour/types.rb#520 - sig { returns(::Parlour::Types::Type) } - def type; end -end - -# A range with known element types. -# -# source://parlour//lib/parlour/types.rb#295 -class Parlour::Types::Range < ::Parlour::Types::SingleElementCollection - # source://parlour//lib/parlour/types.rb#302 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#297 - sig { override.returns(::String) } - def collection_name; end -end - -# A basic type as a raw string. -# -# source://parlour//lib/parlour/types.rb#45 -class Parlour::Types::Raw < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#47 - sig { params(str: ::String).void } - def initialize(str); end - - # source://parlour//lib/parlour/types.rb#55 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#70 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#60 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#65 - sig { override.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#52 - sig { returns(::String) } - def str; end -end - -# A record/shape; a hash with a fixed set of keys with given types. -# -# source://parlour//lib/parlour/types.rb#369 -class Parlour::Types::Record < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#371 - sig { params(keys_to_types: T::Hash[::Symbol, T.any(::Parlour::Types::Type, ::String)]).void } - def initialize(keys_to_types); end - - # source://parlour//lib/parlour/types.rb#378 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#396 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#386 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#391 - sig { override.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#383 - sig { returns(T::Hash[::Symbol, ::Parlour::Types::Type]) } - def keys_to_types; end -end - -# Type equivalent to the receiver. -# -# source://parlour//lib/parlour/types.rb#458 -class Parlour::Types::Self < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#460 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#475 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#465 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#470 - sig { override.returns(::String) } - def generate_rbs; end -end - -# A set with known element types. -# -# source://parlour//lib/parlour/types.rb#282 -class Parlour::Types::Set < ::Parlour::Types::SingleElementCollection - # source://parlour//lib/parlour/types.rb#289 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#284 - sig { override.returns(::String) } - def collection_name; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://parlour//lib/parlour/types.rb#238 -class Parlour::Types::SingleElementCollection < ::Parlour::Types::Type - abstract! - - # source://parlour//lib/parlour/types.rb#242 - sig { params(element: T.any(::Parlour::Types::Type, ::String)).void } - def initialize(element); end - - # @abstract - # - # source://parlour//lib/parlour/types.rb#250 - sig { abstract.returns(::String) } - def collection_name; end - - # source://parlour//lib/parlour/types.rb#263 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#247 - sig { returns(::Parlour::Types::Type) } - def element; end - - # source://parlour//lib/parlour/types.rb#253 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#258 - sig { override.returns(::String) } - def generate_rbs; end -end - -# A fixed-length array of items, each with a known type. -# -# source://parlour//lib/parlour/types.rb#169 -class Parlour::Types::Tuple < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#171 - sig { params(types: T::Array[T.any(::Parlour::Types::Type, ::String)]).void } - def initialize(types); end - - # source://parlour//lib/parlour/types.rb#176 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#194 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#184 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#189 - sig { override.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#181 - sig { returns(T::Array[::Parlour::Types::Type]) } - def types; end -end - -# The top-level, abstract class for a generalised type. All of the other -# types inherit from this. Do not instantiate. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://parlour//lib/parlour/types.rb#10 -class Parlour::Types::Type - abstract! - - # @abstract - # - # source://parlour//lib/parlour/types.rb#41 - sig { abstract.returns(::String) } - def describe; end - - # @abstract - # - # source://parlour//lib/parlour/types.rb#17 - sig { abstract.returns(::String) } - def generate_rbi; end - - # @abstract - # - # source://parlour//lib/parlour/types.rb#20 - sig { abstract.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#36 - def hash; end - - # source://parlour//lib/parlour/types.rb#32 - sig { params(type_like: T.any(::Parlour::Types::Type, ::String)).returns(::Parlour::Types::Type) } - def to_type(type_like); end - - class << self - # source://parlour//lib/parlour/types.rb#23 - sig { params(type_like: T.any(::Parlour::Types::Type, ::String)).returns(::Parlour::Types::Type) } - def to_type(type_like); end - end -end - -# source://parlour//lib/parlour/types.rb#6 -Parlour::Types::TypeLike = T.type_alias { T.any(::Parlour::Types::Type, ::String) } - -# A type which is (at least) one of the wrapped types. -# -# source://parlour//lib/parlour/types.rb#107 -class Parlour::Types::Union < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#109 - sig { params(types: T::Array[T.any(::Parlour::Types::Type, ::String)]).void } - def initialize(types); end - - # source://parlour//lib/parlour/types.rb#114 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#132 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#122 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#127 - sig { override.returns(::String) } - def generate_rbs; end - - # source://parlour//lib/parlour/types.rb#119 - sig { returns(T::Array[::Parlour::Types::Type]) } - def types; end -end - -# The explicit lack of a type. -# -# source://parlour//lib/parlour/types.rb#481 -class Parlour::Types::Untyped < ::Parlour::Types::Type - # source://parlour//lib/parlour/types.rb#483 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://parlour//lib/parlour/types.rb#498 - sig { override.returns(::String) } - def describe; end - - # source://parlour//lib/parlour/types.rb#488 - sig { override.returns(::String) } - def generate_rbi; end - - # source://parlour//lib/parlour/types.rb#493 - sig { override.returns(::String) } - def generate_rbs; end -end - -# The library version. -# -# source://parlour//lib/parlour/version.rb#4 -Parlour::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/parlour.rbi b/Library/Homebrew/sorbet/rbi/parlour.rbi deleted file mode 100644 index d4c1d9429cd49..0000000000000 --- a/Library/Homebrew/sorbet/rbi/parlour.rbi +++ /dev/null @@ -1,420 +0,0 @@ -# typed: strict -class PATH - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def each(*args, **options, &block); end -end - -class Caveats - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def empty?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(String) } - def to_s(*args, **options, &block); end -end - -class Checksum - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def empty?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(String) } - def to_s(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def length(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def [](*args, **options, &block); end -end - -module Debrew - sig { returns(T::Boolean) } - def self.active?; end -end - -class Formula - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def bottle_defined?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def bottle_tag?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def bottled?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def bottle_specification(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def downloader(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def desc(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def license(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def homepage(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def livecheck(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def livecheckable?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def service?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def version(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def allow_network_access!(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def deny_network_access!(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def network_access_allowed?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def loaded_from_api?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def deps(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def declared_deps(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def requirements(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def cached_download(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def clear_cache(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def options(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def deprecated_options(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def deprecated_flags(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def option_defined?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def compiler_failures(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def pour_bottle_check_unsatisfied_reason(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def keg_only_reason(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def deprecated?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def deprecation_date(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def deprecation_reason(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def disabled?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def disable_date(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def disable_reason(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def pinnable?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T::Boolean) } - def pinned?(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def pinned_version(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def pin(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def unpin(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def env(*args, **options, &block); end - - sig { returns(T::Boolean) } - def self.loaded_from_api?; end - - sig { returns(T::Boolean) } - def self.on_system_blocks_exist?; end - - sig { params(arg: T.untyped).returns(T.untyped) } - def self.desc(arg = T.unsafe(nil)); end - - sig { params(arg: T.untyped).returns(T.untyped) } - def self.homepage(arg = T.unsafe(nil)); end - - sig { params(arg: T.untyped).returns(T.untyped) } - def self.revision(arg = T.unsafe(nil)); end - - sig { params(arg: T.untyped).returns(T.untyped) } - def self.version_scheme(arg = T.unsafe(nil)); end -end - -class FormulaInstaller - sig { returns(T::Boolean) } - def installed_as_dependency?; end - - sig { returns(T::Boolean) } - def installed_on_request?; end - - sig { returns(T::Boolean) } - def show_summary_heading?; end - - sig { returns(T::Boolean) } - def show_header?; end - - sig { returns(T::Boolean) } - def force_bottle?; end - - sig { returns(T::Boolean) } - def ignore_deps?; end - - sig { returns(T::Boolean) } - def only_deps?; end - - sig { returns(T::Boolean) } - def interactive?; end - - sig { returns(T::Boolean) } - def git?; end - - sig { returns(T::Boolean) } - def force?; end - - sig { returns(T::Boolean) } - def overwrite?; end - - sig { returns(T::Boolean) } - def keep_tmp?; end - - sig { returns(T::Boolean) } - def debug_symbols?; end - - sig { returns(T::Boolean) } - def verbose?; end - - sig { returns(T::Boolean) } - def debug?; end - - sig { returns(T::Boolean) } - def quiet?; end -end - -class Livecheck - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def version(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def arch(*args, **options, &block); end -end - -module MachOShim - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def dylib_id(*args, **options, &block); end -end - -class PkgVersion - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def major(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def minor(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def patch(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def major_minor(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def major_minor_patch(*args, **options, &block); end -end - -class Requirement - sig { params(arg: T.untyped).returns(T.untyped) } - def self.fatal(arg = T.unsafe(nil)); end - - sig { params(arg: T.untyped).returns(T.untyped) } - def self.cask(arg = T.unsafe(nil)); end - - sig { params(arg: T.untyped).returns(T.untyped) } - def self.download(arg = T.unsafe(nil)); end -end - -class BottleSpecification - sig { params(arg: T.untyped).returns(T.untyped) } - def rebuild(arg = T.unsafe(nil)); end -end - -class SystemCommand - sig { returns(T::Boolean) } - def sudo?; end - - sig { returns(T::Boolean) } - def sudo_as_root?; end - - sig { returns(T::Boolean) } - def must_succeed?; end - - sig { returns(T::Boolean) } - def reset_uid?; end -end - -module Utils - module AST - class FormulaAST - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def process(*args, **options, &block); end - end - end -end - -module Cask - class Audit - sig { returns(T::Boolean) } - def new_cask?; end - - sig { returns(T::Boolean) } - def strict?; end - - sig { returns(T::Boolean) } - def signing?; end - - sig { returns(T::Boolean) } - def online?; end - - sig { returns(T::Boolean) } - def token_conflicts?; end - end - - class Cask - sig { returns(T::Boolean) } - def loaded_from_api?; end - end - - class Installer - sig { returns(T::Boolean) } - def binaries?; end - - sig { returns(T::Boolean) } - def force?; end - - sig { returns(T::Boolean) } - def adopt?; end - - sig { returns(T::Boolean) } - def skip_cask_deps?; end - - sig { returns(T::Boolean) } - def require_sha?; end - - sig { returns(T::Boolean) } - def reinstall?; end - - sig { returns(T::Boolean) } - def upgrade?; end - - sig { returns(T::Boolean) } - def verbose?; end - - sig { returns(T::Boolean) } - def zap?; end - - sig { returns(T::Boolean) } - def installed_as_dependency?; end - - sig { returns(T::Boolean) } - def installed_on_request?; end - - sig { returns(T::Boolean) } - def quarantine?; end - - sig { returns(T::Boolean) } - def quiet?; end - end - - class DSL - class Caveats < Base - sig { returns(T::Boolean) } - def discontinued?; end - end - - sig { returns(T::Boolean) } - def deprecated?; end - - sig { returns(T::Boolean) } - def disabled?; end - - sig { returns(T::Boolean) } - def livecheckable?; end - - sig { returns(T::Boolean) } - def on_system_blocks_exist?; end - - sig { returns(T::Boolean) } - def depends_on_set_in_block?; end - end -end - -module Homebrew - class Cleanup - sig { returns(T::Boolean) } - def dry_run?; end - - sig { returns(T::Boolean) } - def scrub?; end - - sig { returns(T::Boolean) } - def prune?; end - end - - class Service - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def bin(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def etc(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def libexec(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def opt_bin(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def opt_libexec(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def opt_pkgshare(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def opt_prefix(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def opt_sbin(*args, **options, &block); end - - sig { params(args: T.untyped, options: T.untyped, block: T.untyped).returns(T.untyped) } - def var(*args, **options, &block); end - end -end diff --git a/Library/Homebrew/sorbet/tapioca/compilers/attrables.rb b/Library/Homebrew/sorbet/tapioca/compilers/attrables.rb new file mode 100644 index 0000000000000..f6d25a5726bd6 --- /dev/null +++ b/Library/Homebrew/sorbet/tapioca/compilers/attrables.rb @@ -0,0 +1,55 @@ +# typed: strict +# frozen_string_literal: true + +require_relative "../../../global" +require "sorbet/tapioca/utils" +require "debrew" + +module Tapioca + module Compilers + class Attrables < Tapioca::Dsl::Compiler + ATTRABLE_FILENAME = "attrable.rb" + ConstantType = type_member { { fixed: Module } } + + sig { override.returns(T::Enumerable[Module]) } + def self.gather_constants + ObjectSpace.each_object(Attrable).map { |obj| obj.name.nil? ? obj.attached_object : obj } + end + + sig { override.void } + def decorate + root.create_path(constant) do |klass| + Homebrew::Tapioca::Utils.methods_from_file(constant, ATTRABLE_FILENAME) + .each { |method| compile_attrable_method(klass, method) } + Homebrew::Tapioca::Utils.methods_from_file(constant, ATTRABLE_FILENAME, class_methods: true) + .each { |method| compile_attrable_method(klass, method, class_method: true) } + end + end + + private + + sig { params(klass: RBI::Scope, method: T.any(Method, UnboundMethod), class_method: T::Boolean).void } + def compile_attrable_method(klass, method, class_method: false) + case method.arity + when -1 + # attr_rw + klass.create_method( + method.name.to_s, + parameters: [create_opt_param("arg", type: "T.untyped", default: "nil")], + return_type: "T.untyped", + class_method:, + ) + when 0 + # attr_predicate + klass.create_method( + method.name.to_s, + return_type: "T::Boolean", + class_method:, + ) + else + raise "Unsupported arity for method #{method.name} - did `Attrable` change?" + end + end + end + end +end diff --git a/Library/Homebrew/sorbet/tapioca/compilers/forwardables.rb b/Library/Homebrew/sorbet/tapioca/compilers/forwardables.rb new file mode 100644 index 0000000000000..cdad20ba376e7 --- /dev/null +++ b/Library/Homebrew/sorbet/tapioca/compilers/forwardables.rb @@ -0,0 +1,79 @@ +# typed: strict +# frozen_string_literal: true + +require_relative "../../../global" +require "sorbet/tapioca/utils" +require "utils/ast" + +module Tapioca + module Compilers + class Forwardables < Tapioca::Dsl::Compiler + FORWARDABLE_FILENAME = "forwardable.rb" + ARRAY_METHODS = T.let(["to_a", "to_ary"].freeze, T::Array[String]) + HASH_METHODS = T.let(["to_h", "to_hash"].freeze, T::Array[String]) + STRING_METHODS = T.let(["to_s", "to_str", "to_json"].freeze, T::Array[String]) + + ConstantType = type_member { { fixed: Module } } + + sig { override.returns(T::Enumerable[Module]) } + def self.gather_constants + objects = T.cast(ObjectSpace.each_object(Forwardable), T::Enumerator[Module]) + objects.map { |obj| named_object(obj) }.uniq.reject do |obj| + # Avoid duplicate stubs for forwardables that are defined in vendored gems + Object.const_source_location(T.must(obj.name))&.first&.include?("vendor/bundle/ruby") + end + end + + sig { params(obj: Module).returns(Module) } + def self.named_object(obj) + if obj.is_a?(Class) && obj.name.nil? + T.cast(obj.attached_object, Module) + else + obj + end + end + + sig { override.void } + def decorate + root.create_path(constant) do |klass| + Homebrew::Tapioca::Utils.methods_from_file(constant, FORWARDABLE_FILENAME) + .each { |method| compile_forwardable_method(klass, method) } + Homebrew::Tapioca::Utils.methods_from_file(constant, FORWARDABLE_FILENAME, class_methods: true) + .each { |method| compile_forwardable_method(klass, method, class_method: true) } + end + end + + private + + sig { params(klass: RBI::Scope, method: T.any(Method, UnboundMethod), class_method: T::Boolean).void } + def compile_forwardable_method(klass, method, class_method: false) + name = method.name.to_s + return_type = return_type(name) + klass.create_method( + name, + parameters: [ + create_rest_param("args", type: "T.untyped"), + create_block_param("block", type: "T.untyped"), + ], + return_type:, + class_method:, + ) + end + + sig { params(name: String).returns(String) } + def return_type(name) + if name.end_with?("?") + "T::Boolean" + elsif ARRAY_METHODS.include?(name) + "Array" + elsif HASH_METHODS.include?(name) + "Hash" + elsif STRING_METHODS.include?(name) + "String" + else + "T.untyped" + end + end + end + end +end diff --git a/Library/Homebrew/sorbet/tapioca/config.yml b/Library/Homebrew/sorbet/tapioca/config.yml index 175e2126852ec..22b4224b1e610 100644 --- a/Library/Homebrew/sorbet/tapioca/config.yml +++ b/Library/Homebrew/sorbet/tapioca/config.yml @@ -6,11 +6,9 @@ gem: - json # These aren't needed: - coderay - - commander - diff-lcs - docile - hana - - highline - language_server-protocol - netrc - parallel diff --git a/Library/Homebrew/sorbet/tapioca/utils.rb b/Library/Homebrew/sorbet/tapioca/utils.rb new file mode 100644 index 0000000000000..e46be03b16f11 --- /dev/null +++ b/Library/Homebrew/sorbet/tapioca/utils.rb @@ -0,0 +1,23 @@ +# typed: strict +# frozen_string_literal: true + +module Homebrew + module Tapioca + module Utils + # @param class_methods [Boolean] whether to get class methods or instance methods + # @return the `module` methods that are defined in the given file + sig { + params(mod: Module, file_name: String, + class_methods: T::Boolean).returns(T::Array[T.any(Method, UnboundMethod)]) + } + def self.methods_from_file(mod, file_name, class_methods: false) + methods = if class_methods + mod.methods(false).map { mod.method(_1) } + else + mod.instance_methods(false).map { mod.instance_method(_1) } + end + methods.select { _1.source_location&.first&.end_with?(file_name) } + end + end + end +end diff --git a/Library/Homebrew/test/support/helper/cmd/brew-verify-undefined.rb b/Library/Homebrew/test/support/helper/cmd/brew-verify-undefined.rb index 8d8a8cd63ed51..2939e93e02771 100755 --- a/Library/Homebrew/test/support/helper/cmd/brew-verify-undefined.rb +++ b/Library/Homebrew/test/support/helper/cmd/brew-verify-undefined.rb @@ -25,7 +25,6 @@ Minitest Nokogiri OS::Mac::Version - Parlour PatchELF Pry ProgressBar diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index b65593426e1b4..b0c1ba404e7ad 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -41,8 +41,6 @@ def self.extension_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bigdecimal-3.1.8/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bindata-2.5.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/coderay-1.1.3/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/highline-3.0.1/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/commander-5.0.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/diff-lcs-1.5.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/docile-1.4.1/lib") @@ -66,14 +64,13 @@ def self.extension_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/racc-1.8.1") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/racc-1.8.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parser-3.3.5.0/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rainbow-3.1.1/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.11602/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parlour-9.0.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.5.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.7.1/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/prism-1.2.0") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/prism-1.2.0/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/prism-1.1.0") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/prism-1.1.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/pry-0.14.2/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rainbow-3.1.1/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.11602/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbi-0.2.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/rbs-3.6.1") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbs-3.6.1/lib") diff --git a/docs/Typechecking.md b/docs/Typechecking.md index 8046dcd9561cf..1d724402c7f9f 100644 --- a/docs/Typechecking.md +++ b/docs/Typechecking.md @@ -44,7 +44,6 @@ There are also a very small number of files that Homebrew loads before sorbet-ru - `gems`: RBI files for all gems are generated using [Tapioca](https://github.com/Shopify/tapioca#tapioca). - `dsl`: RBI files autogenerated by our [Tapioca compilers](https://github.com/Homebrew/brew/tree/master/Library/Homebrew/sorbet/tapioca/compilers). - - `parlour.rbi`: RBI files generated by Parlour that have not yet been migrated to Tapioca compilers - `upstream.rbi`: This file is not auto-generated and is a manually written file that contains temporary workarounds for upstream Sorbet issues. This file is typically empty. - The `config` file is a newline-separated list of arguments to pass to `srb tc`, the same as if they’d been passed on the command line. Arguments in the config file are always passed first, followed by arguments provided on the command line. We use it to ignore Gem directories which we do not wish to type check. From 70641dcb58de13c801e705e9a05f7067738876cd Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Mon, 14 Oct 2024 21:38:59 -0700 Subject: [PATCH 2/2] Remove casts --- .../sorbet/tapioca/compilers/attrables.rb | 4 +--- .../sorbet/tapioca/compilers/forwardables.rb | 12 +--------- Library/Homebrew/sorbet/tapioca/utils.rb | 22 +++++++++++++++++++ 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/Library/Homebrew/sorbet/tapioca/compilers/attrables.rb b/Library/Homebrew/sorbet/tapioca/compilers/attrables.rb index f6d25a5726bd6..a1ae0740f7eaa 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/attrables.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/attrables.rb @@ -12,9 +12,7 @@ class Attrables < Tapioca::Dsl::Compiler ConstantType = type_member { { fixed: Module } } sig { override.returns(T::Enumerable[Module]) } - def self.gather_constants - ObjectSpace.each_object(Attrable).map { |obj| obj.name.nil? ? obj.attached_object : obj } - end + def self.gather_constants = Homebrew::Tapioca::Utils.named_objects_with_module(Attrable) sig { override.void } def decorate diff --git a/Library/Homebrew/sorbet/tapioca/compilers/forwardables.rb b/Library/Homebrew/sorbet/tapioca/compilers/forwardables.rb index cdad20ba376e7..6898beef6e428 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/forwardables.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/forwardables.rb @@ -17,22 +17,12 @@ class Forwardables < Tapioca::Dsl::Compiler sig { override.returns(T::Enumerable[Module]) } def self.gather_constants - objects = T.cast(ObjectSpace.each_object(Forwardable), T::Enumerator[Module]) - objects.map { |obj| named_object(obj) }.uniq.reject do |obj| + Homebrew::Tapioca::Utils.named_objects_with_module(Forwardable).reject do |obj| # Avoid duplicate stubs for forwardables that are defined in vendored gems Object.const_source_location(T.must(obj.name))&.first&.include?("vendor/bundle/ruby") end end - sig { params(obj: Module).returns(Module) } - def self.named_object(obj) - if obj.is_a?(Class) && obj.name.nil? - T.cast(obj.attached_object, Module) - else - obj - end - end - sig { override.void } def decorate root.create_path(constant) do |klass| diff --git a/Library/Homebrew/sorbet/tapioca/utils.rb b/Library/Homebrew/sorbet/tapioca/utils.rb index e46be03b16f11..23369c1019355 100644 --- a/Library/Homebrew/sorbet/tapioca/utils.rb +++ b/Library/Homebrew/sorbet/tapioca/utils.rb @@ -4,6 +4,17 @@ module Homebrew module Tapioca module Utils + sig { params(klass: T::Class[T.anything]).returns(Module) } + def self.named_object_for(klass) + return klass if klass.name + + attached_object = klass.attached_object + case attached_object + when Module then attached_object + else raise "Unsupported attached object for: #{klass}" + end + end + # @param class_methods [Boolean] whether to get class methods or instance methods # @return the `module` methods that are defined in the given file sig { @@ -18,6 +29,17 @@ def self.methods_from_file(mod, file_name, class_methods: false) end methods.select { _1.source_location&.first&.end_with?(file_name) } end + + sig { params(mod: Module).returns(T::Array[Module]) } + def self.named_objects_with_module(mod) + ObjectSpace.each_object(mod).map do |obj| + case obj + when Class then named_object_for(obj) + when Module then obj + else raise "Unsupported object: #{obj}" + end + end.uniq + end end end end