Skip to content
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

Adding a return value to tick() #541

Closed
kingbuzzman opened this issue Apr 15, 2024 · 0 comments · Fixed by #542
Closed

Adding a return value to tick() #541

kingbuzzman opened this issue Apr 15, 2024 · 0 comments · Fixed by #542

Comments

@kingbuzzman
Copy link
Contributor

I find myself writing a lot of code like this:

freezegun.tick(#)
some_func(datetime.now())

or sometimes

freezegun.tick(#)
some_func(freezegun.time_to_freeze)

But can we change the the return of freezegun.tick() so it returns the new datetime. Everyone that is using it now is ignoring the value of tick() so this wouldn't break anything. I haven't made a PR since i wanted blessing before making a PR.

To be clear, the new change would mean i could write code like this:

some_func(freezegun.tick(#))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant