Exceptions¶
typed_sentinels._exceptions
¶
Classes¶
SentinelError
¶
Bases: TypeError
Base class from which all typed_sentinels Exception objects inherit.
InvalidHintError
¶
Bases: SentinelError
Argument for hint must not be Sentinel, Ellipsis, True, False, None, or a Sentinel instance.
Initialize InvalidHintError.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hint
|
Any
|
The invalid argument for |
required |
Source code in src/typed_sentinels/_exceptions.py
Functions¶
SubscriptedTypeError
¶
Bases: SentinelError
Subscripted type and hint must match.
Initialize SubscriptedTypeError.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hint
|
Any
|
Provided argument for |
required |
subscripted
|
Any
|
Type provided via subscription notation to the |
required |