Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/aniso8601/exceptions.py: 92%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# -*- coding: utf-8 -*-
3# Copyright (c) 2026, Brandon Nielsen
4# SPDX-License-Identifier: BSD-3-Clause
7class ISOFormatError(ValueError):
8 """Raised when ISO 8601 string fails a format check."""
11class RangeCheckError(ValueError):
12 """Parent type of range check errors."""
15class YearOutOfBoundsError(RangeCheckError):
16 """Raised when year exceeds limits."""
19class MonthOutOfBoundsError(RangeCheckError):
20 """Raised when month is outside of 1..12."""
23class WeekOutOfBoundsError(RangeCheckError):
24 """Raised when week exceeds a year."""
27class DayOutOfBoundsError(RangeCheckError):
28 """Raised when day is outside of 1..365, 1..366 for leap year."""
31class HoursOutOfBoundsError(RangeCheckError):
32 """Raise when parsed hours are greater than 24."""
35class MinutesOutOfBoundsError(RangeCheckError):
36 """Raise when parsed seconds are greater than 60."""
39class SecondsOutOfBoundsError(RangeCheckError):
40 """Raise when parsed seconds are greater than 60."""
43class MidnightBoundsError(RangeCheckError):
44 """Raise when parsed time has an hour of 24 but is not midnight."""
47class LeapSecondError(RangeCheckError):
48 """Raised when attempting to parse a leap second"""