utils/inreplace: fix typechecking error

Fixes

        TypeError: Parameter 'before': Expected type T.nilable(T.any(Regexp, String)), got type Pathname with value #<Pathname:/opt/homebrew/Cellar/php@8.1/8.1.21/lib/php>
      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
This commit is contained in:
Carlo Cabrera 2023-07-23 18:23:04 +08:00
parent b5d13ce68d
commit fa384b7cc3
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -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