-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Narrow member type of inreplace paths enumerable #15800
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @dduugg!
after &&= after.to_s | ||
before = before.to_s if before.is_a?(Pathname) | ||
|
||
errors = {} | ||
|
||
errors["`paths` (first) parameter"] = ["`paths` was empty"] if paths.blank? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some slight logic change to account for the fact that Enumerable
doesn't necessarily define blank?
. This is technically more strict (['']
would previously have been ok), but i believe to be semantically correct.
@@ -39,21 +39,22 @@ def initialize(errors) | |||
# @api public | |||
sig { | |||
params( | |||
paths: T.any(T::Array[T.untyped], String, Pathname), | |||
paths: T.any(T::Enumerable[T.any(String, Pathname)], String, Pathname), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this needs be widened to allow the super call in the Formula
implementation (although sorbet
didn't complain).
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?As suggested in #15796 (comment)
cc @carlocab @MikeMcQuaid