spulec/freezegun

Adding a return value to tick()

Closed this issue · 0 comments

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(#))