Path: blob/master/ invest-robot-contest_TinkoffBotTwitch-main/venv/lib/python3.8/site-packages/pytz/exceptions.py
7771 views
'''1Custom exceptions raised by pytz.2'''34__all__ = [5'UnknownTimeZoneError', 'InvalidTimeError', 'AmbiguousTimeError',6'NonExistentTimeError',7]8910class Error(Exception):11'''Base class for all exceptions raised by the pytz library'''121314class UnknownTimeZoneError(KeyError, Error):15'''Exception raised when pytz is passed an unknown timezone.1617>>> isinstance(UnknownTimeZoneError(), LookupError)18True1920This class is actually a subclass of KeyError to provide backwards21compatibility with code relying on the undocumented behavior of earlier22pytz releases.2324>>> isinstance(UnknownTimeZoneError(), KeyError)25True2627And also a subclass of pytz.exceptions.Error, as are other pytz28exceptions.2930>>> isinstance(UnknownTimeZoneError(), Error)31True3233'''34pass353637class InvalidTimeError(Error):38'''Base class for invalid time exceptions.'''394041class AmbiguousTimeError(InvalidTimeError):42'''Exception raised when attempting to create an ambiguous wallclock time.4344At the end of a DST transition period, a particular wallclock time will45occur twice (once before the clocks are set back, once after). Both46possibilities may be correct, unless further information is supplied.4748See DstTzInfo.normalize() for more info49'''505152class NonExistentTimeError(InvalidTimeError):53'''Exception raised when attempting to create a wallclock time that54cannot exist.5556At the start of a DST transition period, the wallclock time jumps forward.57The instants jumped over never occur.58'''596061