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

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

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

sherbang
Copy link
Contributor

@sherbang sherbang commented Apr 30, 2024

Description

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

Checklist

  • Build runs successfully
  • Docs updated

Release checklist (maintainers only)

  • Version updated in pyproject.toml
  • Version updated in src/whenever/__init__.py
  • Version updated in changelog
  • Branch merged
  • Tag created and pushed
  • Published
  • Github release created

@ariebovenberg
Copy link
Owner

@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
Copy link
Owner

ariebovenberg commented Apr 30, 2024

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
Copy link
Contributor Author

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

@ariebovenberg ariebovenberg merged commit 5bcb69a into ariebovenberg:main Apr 30, 2024
10 checks passed
@ariebovenberg
Copy link
Owner

Thanks @sherbang for your contribution! 🚀

@ariebovenberg
Copy link
Owner

release 0.5.2 is now out with your addition!

@sherbang sherbang deleted the add_from_py_date branch May 1, 2024 09:39
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 this pull request may close these issues.

None yet

2 participants