Merge pull request #16809 from reitermarkus/tap-sig-cache

Actually cache `Tap` methods.
This commit is contained in:
Mike McQuaid 2024-03-04 16:25:49 +00:00 committed by GitHub
commit 91174d6996
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -851,18 +851,19 @@ class Tap
# Hash with audit exceptions # Hash with audit exceptions
sig { returns(Hash) } sig { returns(Hash) }
def audit_exceptions 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 end
# Hash with style exceptions # Hash with style exceptions
sig { returns(Hash) } sig { returns(Hash) }
def style_exceptions 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 end
# Hash with pypi formula mappings # Hash with pypi formula mappings
sig { returns(Hash) }
def pypi_formula_mappings 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 end
# Array with synced versions formulae # Array with synced versions formulae