brew style --fix

This commit is contained in:
Mike McQuaid 2024-05-23 17:08:41 +01:00
parent d780bd7734
commit 6e9288470e
No known key found for this signature in database
23 changed files with 32 additions and 32 deletions

View File

@ -38,7 +38,7 @@ module Cask
def initialize(cask, **directives) def initialize(cask, **directives)
directives.assert_valid_keys(*ORDERED_DIRECTIVES) directives.assert_valid_keys(*ORDERED_DIRECTIVES)
super(cask, **directives) super
directives[:signal] = Array(directives[:signal]).flatten.each_slice(2).to_a directives[:signal] = Array(directives[:signal]).flatten.each_slice(2).to_a
@directives = directives @directives = directives

View File

@ -8,7 +8,7 @@ module Cask
# Artifact corresponding to the `binary` stanza. # Artifact corresponding to the `binary` stanza.
class Binary < Symlinked class Binary < Symlinked
def link(command: nil, **options) def link(command: nil, **options)
super(command:, **options) super
return if source.executable? return if source.executable?
if source.writable? if source.writable?

View File

@ -69,7 +69,7 @@ module Cask
attr_reader :path, :args attr_reader :path, :args
def initialize(cask, **args) def initialize(cask, **args)
super(cask, **args) super
if args.key?(:manual) if args.key?(:manual)
@path = Pathname(args[:manual]) @path = Pathname(args[:manual])

View File

@ -8,12 +8,12 @@ module Cask
# Artifact corresponding to the `keyboard_layout` stanza. # Artifact corresponding to the `keyboard_layout` stanza.
class KeyboardLayout < Moved class KeyboardLayout < Moved
def install_phase(**options) def install_phase(**options)
super(**options) super
delete_keyboard_layout_cache(**options) delete_keyboard_layout_cache(**options)
end end
def uninstall_phase(**options) def uninstall_phase(**options)
super(**options) super
delete_keyboard_layout_cache(**options) delete_keyboard_layout_cache(**options)
end end

View File

@ -13,7 +13,7 @@ module Cask
end end
def install_phase(**options) def install_phase(**options)
super(**options) super
reload_spotlight(**options) reload_spotlight(**options)
end end

View File

@ -19,7 +19,7 @@ module Cask
end end
def initialize(cask, path, **stanza_options) def initialize(cask, path, **stanza_options)
super(cask, path, **stanza_options) super
@path = cask.staged_path.join(path) @path = cask.staged_path.join(path)
@stanza_options = stanza_options @stanza_options = stanza_options
end end

View File

@ -13,12 +13,12 @@ module Cask
end end
def install_phase(**options) def install_phase(**options)
super(**options) super
reload_quicklook(**options) reload_quicklook(**options)
end end
def uninstall_phase(**options) def uninstall_phase(**options)
super(**options) super
reload_quicklook(**options) reload_quicklook(**options)
end end

View File

@ -38,7 +38,7 @@ module Cask
.void .void
} }
def initialize(cask, source, **target_hash) def initialize(cask, source, **target_hash)
super(cask, source, **target_hash) super
target = target_hash[:target] target = target_hash[:target]
@source_string = source.to_s @source_string = source.to_s

View File

@ -20,7 +20,7 @@ module Cask
attr_predicate :discontinued? attr_predicate :discontinued?
def initialize(*args) def initialize(*args)
super(*args) super
@built_in_caveats = {} @built_in_caveats = {}
@custom_caveats = [] @custom_caveats = []
@discontinued = false @discontinued = false

View File

@ -15,7 +15,7 @@ module Homebrew
def initialize def initialize
require "cli/named_args" require "cli/named_args"
super() super
@processed_options = [] @processed_options = []
@options_only = [] @options_only = []

View File

@ -256,7 +256,7 @@ class UsesFromMacOSDependency < Dependency
sig { params(minimum_version: T.nilable(Version), minimum_revision: T.nilable(Integer)).returns(T::Boolean) } sig { params(minimum_version: T.nilable(Version), minimum_revision: T.nilable(Integer)).returns(T::Boolean) }
def installed?(minimum_version: nil, minimum_revision: nil) def installed?(minimum_version: nil, minimum_revision: nil)
use_macos_install? || super(minimum_version:, minimum_revision:) use_macos_install? || super
end end
sig { returns(T::Boolean) } sig { returns(T::Boolean) }

View File

@ -146,11 +146,11 @@ class AbstractDownloadStrategy
private private
def puts(*args) def puts(*args)
super(*args) unless quiet? super unless quiet?
end end
def ohai(*args) def ohai(*args)
super(*args) unless quiet? super unless quiet?
end end
def silent_command(*args, **options) def silent_command(*args, **options)
@ -605,7 +605,7 @@ class HomebrewCurlDownloadStrategy < CurlDownloadStrategy
raise HomebrewCurlDownloadStrategyError, url unless Formula["curl"].any_version_installed? raise HomebrewCurlDownloadStrategyError, url unless Formula["curl"].any_version_installed?
options[:use_homebrew_curl] = true options[:use_homebrew_curl] = true
super(*args, **options) super
end end
end end
@ -620,7 +620,7 @@ class CurlGitHubPackagesDownloadStrategy < CurlDownloadStrategy
# GitHub Packages authorization header. # GitHub Packages authorization header.
# HOMEBREW_GITHUB_PACKAGES_AUTH set in brew.sh # HOMEBREW_GITHUB_PACKAGES_AUTH set in brew.sh
meta[:headers] << "Authorization: #{HOMEBREW_GITHUB_PACKAGES_AUTH}" meta[:headers] << "Authorization: #{HOMEBREW_GITHUB_PACKAGES_AUTH}"
super(url, name, version, **meta) super
end end
private private

View File

@ -128,7 +128,7 @@ module Stdenv
sig { void } sig { void }
def clang def clang
super() super
replace_in_cflags(/-Xarch_#{Hardware::CPU.arch_32_bit} (-march=\S*)/, '\1') replace_in_cflags(/-Xarch_#{Hardware::CPU.arch_32_bit} (-march=\S*)/, '\1')
map = Hardware::CPU.optimization_flags.dup map = Hardware::CPU.optimization_flags.dup
if DevelopmentTools.clang_build_version < 700 if DevelopmentTools.clang_build_version < 700

View File

@ -21,11 +21,11 @@ module InstallRenamed
end end
def +(other) def +(other)
super(other).extend(InstallRenamed) super.extend(InstallRenamed)
end end
def /(other) def /(other)
super(other).extend(InstallRenamed) super.extend(InstallRenamed)
end end
private private

View File

@ -22,7 +22,7 @@ module Homebrew
# Don't duplicate the URL if the link text is the same as the URL. # Don't duplicate the URL if the link text is the same as the URL.
"<#{text}>" "<#{text}>"
else else
super(element, options) super
end end
end end
end end

View File

@ -11,7 +11,7 @@ class ArchRequirement < Requirement
def initialize(tags) def initialize(tags)
@arch = tags.shift @arch = tags.shift
super(tags) super
end end
satisfy(build_env: false) do satisfy(build_env: false) do

View File

@ -13,7 +13,7 @@ class CodesignRequirement < Requirement
@identity = options.fetch(:identity) @identity = options.fetch(:identity)
@with = options.fetch(:with, "code signing") @with = options.fetch(:with, "code signing")
@url = options.fetch(:url, nil) @url = options.fetch(:url, nil)
super(tags) super
end end
satisfy(build_env: false) do satisfy(build_env: false) do

View File

@ -88,7 +88,7 @@ class MacOSRequirement < Requirement
end end
def ==(other) def ==(other)
super(other) && comparator == other.comparator && version == other.version super && comparator == other.comparator && version == other.version
end end
alias eql? == alias eql? ==

View File

@ -16,7 +16,7 @@ class XcodeRequirement < Requirement
def initialize(tags = []) def initialize(tags = [])
@version = tags.shift if tags.first.to_s.match?(/(\d\.)+\d/) @version = tags.shift if tags.first.to_s.match?(/(\d\.)+\d/)
super(tags) super
end end
sig { returns(T::Boolean) } sig { returns(T::Boolean) }

View File

@ -143,7 +143,7 @@ class Resource < Downloadable
def fetch(verify_download_integrity: true) def fetch(verify_download_integrity: true)
fetch_patches fetch_patches
super(verify_download_integrity:) super
end end
# {Livecheck} can be used to check for newer versions of the software. # {Livecheck} can be used to check for newer versions of the software.

View File

@ -13,19 +13,19 @@ unless ENV["HOMEBREW_SORBET_RUNTIME"]
# @private # @private
module TNoChecks module TNoChecks
def cast(value, type, checked: false) def cast(value, type, checked: false)
super(value, type, checked:) super
end end
def let(value, type, checked: false) def let(value, type, checked: false)
super(value, type, checked:) super
end end
def bind(value, type, checked: false) def bind(value, type, checked: false)
super(value, type, checked:) super
end end
def assert_type!(value, type, checked: false) def assert_type!(value, type, checked: false)
super(value, type, checked:) super
end end
end end

View File

@ -18,7 +18,7 @@ RSpec.describe Homebrew::Cmd::UpdateReport do
ENV["HOMEBREW_UPDATE_BEFORE#{tap.repo_var_suffix}"] = "12345678" ENV["HOMEBREW_UPDATE_BEFORE#{tap.repo_var_suffix}"] = "12345678"
ENV["HOMEBREW_UPDATE_AFTER#{tap.repo_var_suffix}"] = "abcdef00" ENV["HOMEBREW_UPDATE_AFTER#{tap.repo_var_suffix}"] = "abcdef00"
super(tap) super
end end
end end
end end

View File

@ -23,7 +23,7 @@ module Homebrew
# Ignore non-documentation comments. # Ignore non-documentation comments.
content = content&.sub(/\A(typed|.*rubocop):.*/m, "") content = content&.sub(/\A(typed|.*rubocop):.*/m, "")
content = super(content) content = super
source = handler&.statement&.source source = handler&.statement&.source