From a1bf42cc891f172cdd05f8e10cc162a111edf8b9 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Sun, 23 Jul 2023 15:23:45 +0800 Subject: [PATCH] formula: fix `inreplace` typechecking error Fixes TypeError: Parameter 'before': Expected type T.nilable(T.any(Regexp, String)), got type Pathname with value # Caller: /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/php.rb:207 Definition: /opt/homebrew/Library/Homebrew/formula.rb:2483 https://github.com/Homebrew/homebrew-core/actions/runs/5635089949/job/15265751616?pr=137335#step:3:1732 --- Library/Homebrew/formula.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index e168965158..10ff5b4cc0 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2475,7 +2475,7 @@ class Formula sig { params( paths: T.any(T::Array[T.untyped], String, Pathname), - before: T.nilable(T.any(Regexp, String)), + before: T.nilable(T.any(Pathname, Regexp, String)), after: T.nilable(T.any(Pathname, String, Symbol)), audit_result: T::Boolean, ).void