CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
exceptions.py52 linesDownload Raw Back to kiwisolver
1# --------------------------------------------------------------------------------------
2# Copyright (c) 2023-2024, Nucleic Development Team.
3#
4# Distributed under the terms of the Modified BSD License.
5#
6# The full license is in the file LICENSE, distributed with this software.
7# --------------------------------------------------------------------------------------
8"""Kiwi exceptions.
9
10Imported by the kiwisolver C extension.
11
12"""
13
14
15class BadRequiredStrength(Exception):
16    pass
17
18
19class DuplicateConstraint(Exception):
20    __slots__ = ("constraint",)
21
22    def __init__(self, constraint):
23        self.constraint = constraint
24
25
26class DuplicateEditVariable(Exception):
27    __slots__ = ("edit_variable",)
28
29    def __init__(self, edit_variable):
30        self.edit_variable = edit_variable
31
32
33class UnknownConstraint(Exception):
34    __slots__ = ("constraint",)
35
36    def __init__(self, constraint):
37        self.constraint = constraint
38
39
40class UnknownEditVariable(Exception):
41    __slots__ = ("edit_variable",)
42
43    def __init__(self, edit_variable):
44        self.edit_variable = edit_variable
45
46
47class UnsatisfiableConstraint(Exception):
48    __slots__ = ("constraint",)
49
50    def __init__(self, constraint):
51        self.constraint = constraint
52