-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Deprecate Faker::Number.decimal_part and .leading_zero_number #1516
Deprecate Faker::Number.decimal_part and .leading_zero_number #1516
Conversation
|
Yeah! There is no replacement yet @tjwallace any suggestions? |
@tjwallace the replacement would be converting the strings to decimals. I'll think about it. Feel free to open a PR in case you come up with a good idea. If we make it, we don't need to deprecate/remove the methods. |
If I think I am following this correctly, |
@dadamschi I haven't had time to change it yet, but our final idea was to keep |
I think that makes sense. Thanks for clearing that up. And, FWIW, what is returned for |
I like the idea to return
Doesn't it make sense to change internal implementation too? Otherwise tests output become messy |
@aleksejkuzmin this issue talks about that #1655 and it'll be fixed in v2. |
@vbrazo sorry, didn't spot that issue. thanks for answering! |
In version 2.0,
Faker::Number
methods are going to returninteger
, so we need to deprecate a few methods that won't make sense soon.Checklist
Faker::Number.decimal_part
Faker::Number.leading_zero_number
This PR is related to #510.