Skip to content

Commit a0a78e6

Browse files
committed
Remove support for passing Formulae to pretty_*ed methods
It doesn't look like these are even needed.
1 parent a76c33f commit a0a78e6

File tree

3 files changed

+7
-22
lines changed

3 files changed

+7
-22
lines changed

Library/Homebrew/cmd/info.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,9 @@ def info_formula(formula)
371371
def decorate_dependencies(dependencies)
372372
deps_status = dependencies.map do |dep|
373373
if dep.satisfied?([])
374-
pretty_installed_string(dep_display_s(dep))
374+
pretty_installed(dep_display_s(dep))
375375
else
376-
pretty_uninstalled_string(dep_display_s(dep))
376+
pretty_uninstalled(dep_display_s(dep))
377377
end
378378
end
379379
deps_status.join(", ")

Library/Homebrew/cmd/update-report.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ def dump_new_cask_report
903903
sig { void }
904904
def dump_deleted_formula_report
905905
formulae = select_formula_or_cask(:D).sort.filter_map do |name|
906-
pretty_uninstalled_string(name) if installed?(name)
906+
pretty_uninstalled(name) if installed?(name)
907907
end
908908

909909
output_dump_formula_or_cask_report "Deleted Installed Formulae", formulae
@@ -915,7 +915,7 @@ def dump_deleted_cask_report
915915

916916
casks = select_formula_or_cask(:DC).sort.filter_map do |name|
917917
name = T.must(name.split("/").last)
918-
pretty_uninstalled_string(name) if cask_installed?(name)
918+
pretty_uninstalled(name) if cask_installed?(name)
919919
end
920920

921921
output_dump_formula_or_cask_report "Deleted Installed Casks", casks

Library/Homebrew/extend/kernel.rb

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,8 @@ def odisabled(method, replacement = nil,
234234
odeprecated(method, replacement, disable: true, disable_on:, disable_for_developers:, caller:)
235235
end
236236

237-
sig { params(formula: Formula).returns(String) }
238-
def pretty_installed(formula)
239-
pretty_installed_string(formula.to_s)
240-
end
241-
242237
sig { params(string: String).returns(String) }
243-
def pretty_installed_string(string)
238+
def pretty_installed(string)
244239
if !$stdout.tty?
245240
string
246241
elsif Homebrew::EnvConfig.no_emoji?
@@ -250,13 +245,8 @@ def pretty_installed_string(string)
250245
end
251246
end
252247

253-
sig { params(formula: Formula).returns(String) }
254-
def pretty_outdated(formula)
255-
pretty_outdated_string(formula.to_s)
256-
end
257-
258248
sig { params(string: String).returns(String) }
259-
def pretty_outdated_string(string)
249+
def pretty_outdated(string)
260250
if !$stdout.tty?
261251
string
262252
elsif Homebrew::EnvConfig.no_emoji?
@@ -266,13 +256,8 @@ def pretty_outdated_string(string)
266256
end
267257
end
268258

269-
sig { params(formula: Formula).returns(String) }
270-
def pretty_uninstalled(formula)
271-
pretty_uninstalled_string(formula.to_s)
272-
end
273-
274259
sig { params(string: String).returns(String) }
275-
def pretty_uninstalled_string(string)
260+
def pretty_uninstalled(string)
276261
if !$stdout.tty?
277262
string
278263
elsif Homebrew::EnvConfig.no_emoji?

0 commit comments

Comments
 (0)