-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix typespec for drop
option
#114
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #114 +/- ##
===========================================
- Coverage 100.00% 98.65% -1.35%
===========================================
Files 2 2
Lines 145 149 +4
===========================================
+ Hits 145 147 +2
- Misses 0 2 +2
Continue to review full report in Codecov by Sentry.
|
I think it needs a new name entirely then as this feels confusing. I don't have a constructive opinion on what it should be. |
Changing the type names can be a backwards incompatible change. So the easiest is to make it so |
@josevalim Didn't realize that about backwards incompatibility, thank you! @bryannaegele Do you think it would be confusing to implement @josevalim's suggestion (
But I consolidated them to prevent a mistake like the one I made, especially now that they're more complex. I have no issue with this if it's more readable, though. |
I think aliasing to keep would be confusing. Copying is the simplest. If I were forced to refactor it, I'd alias the values. Something like
|
|
It could be me but I imagine it would be confusing for a new user to see a signature saying drop is a keep lol. |
It is a type annotation. The type annotation should mean they both have the same type. It doesn't mean they have the same semantics. :) |
I forgot to update this in 3fde830. Now we're using the same `predicate_fun` type for both `keep` and `drop` to prevent them getting out-of-sync.
Just pushed up a change. I think the |
💚 💙 💜 💛 ❤️ |
I forgot to update this in 3fde830. Now we're using the same
keep_fun
type for bothkeep
anddrop
to prevent them getting out-of-sync.