ariebovenberg / whenever

⏰ Sensible and typesafe datetimes for Python
https://whenever.rtfd.io
MIT License
361 stars 7 forks source link

Add from_py_date method to Date to compliment from_py_datetime on _DateTime #118

Closed sherbang closed 2 months ago

sherbang commented 2 months ago

Description

Simple addition of Date.from_py_date, matching the API of the datetime classes.

Checklist

Release checklist (maintainers only)

ariebovenberg commented 2 months ago

@sherbang thanks for spotting this omission and taking the time for this PR 👍

I've started the CI process, which will probably give an error on test coverage. Could you add a simple test in test_date.py to test this new method?

ariebovenberg commented 2 months ago

I also see that isort reported an error. You can run make format to run isort and black and fix this.

The pypy3.8 error is unrelated and due to some pytest issue

sherbang commented 2 months ago

I added a test, and fixed the formatting. Thanks!

ariebovenberg commented 2 months ago

Thanks @sherbang for your contribution! 🚀

ariebovenberg commented 2 months ago

release 0.5.2 is now out with your addition!