fix(project): Use an annotated type for duration strings
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
Inspired by: https://github.com/canonical/snapcraft/pull/5210
This makes an annotated type for duration strings and uses a stricter regex.
- [ ] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `tox run -m lint`?
- [ ] Have you successfully run `tox run -e test-py310`? (supported versions: `py39`, `py310`, `py311`, `py312`)
-----
Evaluation history
No evaluation history available.