pendulum
pendulum copied to clipboard
Fix parse invalid interval string
The function _parse_iso8601_interval raises IndexError when either the first or the last part of the interval is not specified. This fix checks if the interval parts are empty strings and raises ParserError if so.
Pull Request Check List
- [x] Added tests for changed code.
- [x] Updated documentation for changed code.
CodSpeed Performance Report
Merging #860 will not alter performance
Comparing rchindris:master (c44ffb0) with master (b84b976)
Summary
✅ 1 untouched benchmarks
Please rebase your changes with master to fix the failing pipeline
@Secrus 👍