Suppress sorbet type errors when using `undef'
This commit is contained in:
parent
bbe3584168
commit
70b072a7d0
@ -1,4 +1,4 @@
|
|||||||
# typed: true # rubocop:disable Sorbet/StrictSigil
|
# typed: strict
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# typed: true # rubocop:disable Sorbet/StrictSigil
|
# typed: strict
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# typed: true # rubocop:disable Sorbet/StrictSigil
|
# typed: strict
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Cleaner
|
class Cleaner
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# typed: true # rubocop:disable Sorbet/StrictSigil
|
# typed: strict
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# typed: true # rubocop:disable Sorbet/StrictSigil
|
# typed: strict
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Formula
|
class Formula
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# typed: true # rubocop:disable Sorbet/StrictSigil
|
# typed: strict
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class FormulaInstaller
|
class FormulaInstaller
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# typed: true # rubocop:disable Sorbet/StrictSigil
|
# typed: strict
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class LinkageChecker
|
class LinkageChecker
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# typed: true # rubocop:disable Sorbet/StrictSigil
|
# typed: strict
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Readall
|
module Readall
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# typed: true # rubocop:disable Sorbet/StrictSigil
|
# typed: strict
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
|
|||||||
@ -4,4 +4,5 @@
|
|||||||
--ignore=/vendor/gems
|
--ignore=/vendor/gems
|
||||||
--ignore=/vendor/portable-ruby
|
--ignore=/vendor/portable-ruby
|
||||||
--ignore=/test/.gem
|
--ignore=/test/.gem
|
||||||
|
--suppress-error-code=3008
|
||||||
--suppress-error-code=7019
|
--suppress-error-code=7019
|
||||||
|
|||||||
@ -31,6 +31,9 @@ module Tapioca
|
|||||||
sig { override.void }
|
sig { override.void }
|
||||||
def decorate
|
def decorate
|
||||||
cmd = T.cast(constant, T.class_of(Homebrew::AbstractCommand))
|
cmd = T.cast(constant, T.class_of(Homebrew::AbstractCommand))
|
||||||
|
# This is a dummy class to make the `brew` command parsable
|
||||||
|
return if cmd.name == "Homebrew::Cmd::Brew"
|
||||||
|
|
||||||
args_class_name = T.must(T.must(cmd.args_class).name)
|
args_class_name = T.must(T.must(cmd.args_class).name)
|
||||||
root.create_class(args_class_name, superclass_name: "Homebrew::CLI::Args") do |klass|
|
root.create_class(args_class_name, superclass_name: "Homebrew::CLI::Args") do |klass|
|
||||||
create_args_methods(klass, cmd.parser)
|
create_args_methods(klass, cmd.parser)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user