Replace some include Kernel
usages with requires_ancestor
This commit is contained in:
parent
972894d8a0
commit
6db4ed2793
@ -6,6 +6,10 @@ require "utils/user"
|
||||
module Cask
|
||||
# Helper functions for staged casks.
|
||||
module Staged
|
||||
extend T::Helpers
|
||||
|
||||
requires_ancestor { Kernel }
|
||||
|
||||
# FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed.
|
||||
# rubocop:disable Style/MutableConstant
|
||||
Paths = T.type_alias { T.any(String, Pathname, T::Array[T.any(String, Pathname)]) }
|
||||
|
@ -1,7 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module Cask
|
||||
module Staged
|
||||
include Kernel
|
||||
end
|
||||
end
|
@ -5,6 +5,10 @@ require "cask_dependent"
|
||||
|
||||
# Helper functions for dependencies.
|
||||
module DependenciesHelpers
|
||||
extend T::Helpers
|
||||
|
||||
requires_ancestor { Kernel }
|
||||
|
||||
def args_includes_ignores(args)
|
||||
includes = [:required?, :recommended?] # included by default
|
||||
includes << :build? if args.include_build?
|
||||
|
@ -1,5 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module DependenciesHelpers
|
||||
include Kernel
|
||||
end
|
@ -5,6 +5,9 @@ module Homebrew
|
||||
# Helper functions available in formula `test` blocks.
|
||||
module Assertions
|
||||
include Context
|
||||
extend T::Helpers
|
||||
|
||||
requires_ancestor { Kernel }
|
||||
|
||||
require "minitest"
|
||||
require "minitest/assertions"
|
||||
|
@ -1,5 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module Homebrew::Assertions
|
||||
include Kernel
|
||||
end
|
@ -8,6 +8,7 @@ module FormulaCellarChecks
|
||||
extend T::Helpers
|
||||
|
||||
abstract!
|
||||
requires_ancestor { Kernel }
|
||||
|
||||
sig { abstract.returns(Formula) }
|
||||
def formula; end
|
||||
|
@ -1,5 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module FormulaCellarChecks
|
||||
include Kernel
|
||||
end
|
@ -89,6 +89,10 @@ module Language
|
||||
|
||||
# Mixin module for {Formula} adding shebang rewrite features.
|
||||
module Shebang
|
||||
extend T::Helpers
|
||||
|
||||
requires_ancestor { Formula }
|
||||
|
||||
module_function
|
||||
|
||||
# A regex to match potential shebang permutations.
|
||||
|
@ -1,9 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module Language
|
||||
module Node
|
||||
module Shebang
|
||||
include Kernel
|
||||
end
|
||||
end
|
||||
end
|
@ -8,6 +8,10 @@ module Language
|
||||
module Perl
|
||||
# Helper module for replacing `perl` shebangs.
|
||||
module Shebang
|
||||
extend T::Helpers
|
||||
|
||||
requires_ancestor { Formula }
|
||||
|
||||
module_function
|
||||
|
||||
# A regex to match potential shebang permutations.
|
||||
|
@ -1,9 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module Language
|
||||
module Perl
|
||||
module Shebang
|
||||
include Kernel
|
||||
end
|
||||
end
|
||||
end
|
@ -105,6 +105,10 @@ module Language
|
||||
|
||||
# Mixin module for {Formula} adding shebang rewrite features.
|
||||
module Shebang
|
||||
extend T::Helpers
|
||||
|
||||
requires_ancestor { Formula }
|
||||
|
||||
module_function
|
||||
|
||||
# A regex to match potential shebang permutations.
|
||||
@ -144,6 +148,10 @@ module Language
|
||||
|
||||
# Mixin module for {Formula} adding virtualenv support features.
|
||||
module Virtualenv
|
||||
extend T::Helpers
|
||||
|
||||
requires_ancestor { Formula }
|
||||
|
||||
# Instantiates, creates and yields a {Virtualenv} object for use from
|
||||
# {Formula#install}, which provides helper methods for instantiating and
|
||||
# installing packages into a Python virtualenv.
|
||||
|
@ -1,11 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module Language::Python
|
||||
module Shebang
|
||||
include Kernel
|
||||
end
|
||||
|
||||
module Virtualenv
|
||||
requires_ancestor { Formula }
|
||||
end
|
||||
end
|
@ -9,6 +9,8 @@ module UnpackStrategy
|
||||
include SystemCommand::Mixin
|
||||
abstract!
|
||||
|
||||
requires_ancestor { Kernel }
|
||||
|
||||
# FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed.
|
||||
# rubocop:disable Style/MutableConstant
|
||||
UnpackStrategyType = T.type_alias { T.all(T::Class[UnpackStrategy], UnpackStrategy::ClassMethods) }
|
||||
|
@ -1,5 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module UnpackStrategy
|
||||
include Kernel
|
||||
end
|
@ -11,6 +11,9 @@ module Utils
|
||||
module Curl
|
||||
include SystemCommand::Mixin
|
||||
extend SystemCommand::Mixin
|
||||
extend T::Helpers
|
||||
|
||||
requires_ancestor { Kernel }
|
||||
|
||||
# Error returned when the server sent data curl could not parse.
|
||||
CURL_WEIRD_SERVER_REPLY_EXIT_CODE = 8
|
||||
|
@ -1,5 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module Utils::Curl
|
||||
include Kernel
|
||||
end
|
@ -4,6 +4,10 @@
|
||||
module Utils
|
||||
# Helper functions for manipulating shebang lines.
|
||||
module Shebang
|
||||
extend T::Helpers
|
||||
|
||||
requires_ancestor { Kernel }
|
||||
|
||||
module_function
|
||||
|
||||
# Specification on how to rewrite a given shebang.
|
||||
|
@ -1,7 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module Utils
|
||||
module Shebang
|
||||
include Kernel
|
||||
end
|
||||
end
|
@ -3,6 +3,10 @@
|
||||
|
||||
module Utils
|
||||
module Shell
|
||||
extend T::Helpers
|
||||
|
||||
requires_ancestor { Kernel }
|
||||
|
||||
module_function
|
||||
|
||||
# Take a path and heuristically convert it to a shell name,
|
||||
|
@ -1,7 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module Utils
|
||||
module Shell
|
||||
include Kernel
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user