Path: blob/master/ invest-robot-contest_TinkoffBotTwitch-main/venv/lib/python3.8/site-packages/attr/exceptions.py
7759 views
# SPDX-License-Identifier: MIT12from __future__ import absolute_import, division, print_function345class FrozenError(AttributeError):6"""7A frozen/immutable instance or attribute have been attempted to be8modified.910It mirrors the behavior of ``namedtuples`` by using the same error message11and subclassing `AttributeError`.1213.. versionadded:: 20.1.014"""1516msg = "can't set attribute"17args = [msg]181920class FrozenInstanceError(FrozenError):21"""22A frozen instance has been attempted to be modified.2324.. versionadded:: 16.1.025"""262728class FrozenAttributeError(FrozenError):29"""30A frozen attribute has been attempted to be modified.3132.. versionadded:: 20.1.033"""343536class AttrsAttributeNotFoundError(ValueError):37"""38An ``attrs`` function couldn't find an attribute that the user asked for.3940.. versionadded:: 16.2.041"""424344class NotAnAttrsClassError(ValueError):45"""46A non-``attrs`` class has been passed into an ``attrs`` function.4748.. versionadded:: 16.2.049"""505152class DefaultAlreadySetError(RuntimeError):53"""54A default has been set using ``attr.ib()`` and is attempted to be reset55using the decorator.5657.. versionadded:: 17.1.058"""596061class UnannotatedAttributeError(RuntimeError):62"""63A class with ``auto_attribs=True`` has an ``attr.ib()`` without a type64annotation.6566.. versionadded:: 17.3.067"""686970class PythonTooOldError(RuntimeError):71"""72It was attempted to use an ``attrs`` feature that requires a newer Python73version.7475.. versionadded:: 18.2.076"""777879class NotCallableError(TypeError):80"""81A ``attr.ib()`` requiring a callable has been set with a value82that is not callable.8384.. versionadded:: 19.2.085"""8687def __init__(self, msg, value):88super(TypeError, self).__init__(msg, value)89self.msg = msg90self.value = value9192def __str__(self):93return str(self.msg)949596