Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/kiwisolver/exceptions.py: 78%

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

32 statements  

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 DuplicateStay(Exception): 

34 __slots__ = ("variable",) 

35 

36 def __init__(self, variable): 

37 self.variable = variable 

38 

39 

40class UnknownConstraint(Exception): 

41 __slots__ = ("constraint",) 

42 

43 def __init__(self, constraint): 

44 self.constraint = constraint 

45 

46 

47class UnknownEditVariable(Exception): 

48 __slots__ = ("edit_variable",) 

49 

50 def __init__(self, edit_variable): 

51 self.edit_variable = edit_variable 

52 

53 

54class UnknownStay(Exception): 

55 __slots__ = ("variable",) 

56 

57 def __init__(self, variable): 

58 self.variable = variable 

59 

60 

61class UnsatisfiableConstraint(Exception): 

62 __slots__ = ("constraint",) 

63 

64 def __init__(self, constraint): 

65 self.constraint = constraint