Skip to content

Commit

Permalink
Merge pull request #16809 from reitermarkus/tap-sig-cache
Browse files Browse the repository at this point in the history
Actually cache `Tap` methods.
  • Loading branch information
MikeMcQuaid committed Mar 4, 2024
2 parents 8d4e841 + 1a13097 commit 91174d6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Library/Homebrew/tap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -851,18 +851,19 @@ def tap_migrations
# Hash with audit exceptions
sig { returns(Hash) }
def audit_exceptions
@audit_exceptions = read_formula_list_directory "#{HOMEBREW_TAP_AUDIT_EXCEPTIONS_DIR}/*"
@audit_exceptions ||= read_formula_list_directory("#{HOMEBREW_TAP_AUDIT_EXCEPTIONS_DIR}/*")
end

# Hash with style exceptions
sig { returns(Hash) }
def style_exceptions
@style_exceptions = read_formula_list_directory "#{HOMEBREW_TAP_STYLE_EXCEPTIONS_DIR}/*"
@style_exceptions ||= read_formula_list_directory("#{HOMEBREW_TAP_STYLE_EXCEPTIONS_DIR}/*")
end

# Hash with pypi formula mappings
sig { returns(Hash) }
def pypi_formula_mappings
@pypi_formula_mappings = read_formula_list path/HOMEBREW_TAP_PYPI_FORMULA_MAPPINGS_FILE
@pypi_formula_mappings ||= read_formula_list(path/HOMEBREW_TAP_PYPI_FORMULA_MAPPINGS_FILE)
end

# Array with synced versions formulae
Expand Down

0 comments on commit 91174d6

Please sign in to comment.