mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Fix brew style
This commit is contained in:
parent
287b4888e6
commit
c13d7e6723
@ -52,7 +52,7 @@ class Descriptions
|
|||||||
private
|
private
|
||||||
|
|
||||||
def short_names
|
def short_names
|
||||||
@short_names ||= Hash[@descriptions.keys.map { |k| [k, k.split("/").last] }]
|
@short_names ||= @descriptions.keys.map { |k| [k, k.split("/").last] }.to_h
|
||||||
end
|
end
|
||||||
|
|
||||||
def short_name_counts
|
def short_name_counts
|
||||||
|
@ -9,7 +9,7 @@ class SoftwareSpec
|
|||||||
|
|
||||||
if deps.is_a?(Hash)
|
if deps.is_a?(Hash)
|
||||||
bounds = deps.dup
|
bounds = deps.dup
|
||||||
deps = Hash[*bounds.shift]
|
deps = bounds.shift
|
||||||
end
|
end
|
||||||
|
|
||||||
bounds = bounds.transform_values { |v| MacOS::Version.from_symbol(v) }
|
bounds = bounds.transform_values { |v| MacOS::Version.from_symbol(v) }
|
||||||
|
@ -178,7 +178,7 @@ class SoftwareSpec
|
|||||||
end
|
end
|
||||||
|
|
||||||
def uses_from_macos(spec, _bounds = {})
|
def uses_from_macos(spec, _bounds = {})
|
||||||
spec = Hash[*spec.first] if spec.is_a?(Hash)
|
spec = spec.dup.shift if spec.is_a?(Hash)
|
||||||
depends_on(spec)
|
depends_on(spec)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ module SPDX
|
|||||||
else
|
else
|
||||||
bracket = false
|
bracket = false
|
||||||
license_expression.each do |expression|
|
license_expression.each do |expression|
|
||||||
expressions.push license_expression_to_string(Hash[*expression], bracket: true)
|
expressions.push license_expression_to_string([expression].to_h, bracket: true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user