From fa384b7cc381f234d2c18010458fccd7eba201f0 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Sun, 23 Jul 2023 18:23:04 +0800 Subject: [PATCH] utils/inreplace: fix typechecking error Fixes TypeError: Parameter 'before': Expected type T.nilable(T.any(Regexp, String)), got type Pathname with value # Caller: /opt/homebrew/Library/Homebrew/formula.rb:2484 Definition: /opt/homebrew/Library/Homebrew/utils/inreplace.rb:48 https://github.com/Homebrew/homebrew-core/actions/runs/5635089949/job/15266014851#step:3:1737 --- Library/Homebrew/utils/inreplace.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb index c2f627ebea..b7e625b6ea 100644 --- a/Library/Homebrew/utils/inreplace.rb +++ b/Library/Homebrew/utils/inreplace.rb @@ -40,7 +40,7 @@ module Utils 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