ariebovenberg / whenever

⏰ Modern datetime library for Python
https://whenever.rtfd.io
MIT License
893 stars 15 forks source link

Better error messages for Ambiguous end DoesntExistInZone exceptions (#26) #38

Closed exoriente closed 9 months ago

exoriente commented 9 months ago

For issue #26

Description

Better error messages for the Ambiguous and Doesn't Exist errors. Examples:

Instead of checking the behavior of the methods added to the exceptions I'm checking the message in every place the error is checked in any test. It's a bit more work but this way we can be sure the errors are always generated correctly.

Checklist

I did all the check on my local system, but have not performed any of the other steps as they seem more of a maintainer's responsibility. Let me know if you expect more.

ariebovenberg commented 9 months ago

I did all the check on my local system, but have not performed any of the other steps as they seem more of a maintainer's responsibility. Let me know if you expect more.

Indeed. I'll make an adjustment in the PR template

ariebovenberg commented 9 months ago

@exoriente also, I just remembered: there are some examples of the exceptions being raised in docs/overview.rst. They also need to be updated with the better messages.

exoriente commented 9 months ago

@ariebovenberg All done! ✅

ariebovenberg commented 9 months ago

🚀 thanks for your contribution 🤝