Coverage for src / pkg_test_dprohe / extras / extras_2.py: 64%

11 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-02-15 20:52 +0000

1""" 

2docstring for src.pkg_test_dprohe.extras.extras_2 

3""" 

4 

5from ..core.core_2 import multiply, divide 

6 

7 

8class Multiplier: 

9 """ 

10 Docstring for Multiplier 

11 """ 

12 

13 def __init__(self, value: int | float | complex): 

14 """Create a multiplier class that multiplies specific value to numbers 

15 

16 Parameters 

17 ---------- 

18 value : int | float | complex 

19 A value that will be multiplied by any input 

20 """ 

21 self.value = value 

22 

23 def multiply(self, value: int | float | complex): 

24 """Multiplies a value 

25 

26 Parameters 

27 ---------- 

28 value : int | float | complex 

29 A value to add to 

30 

31 Returns 

32 ------- 

33 product : int | float | complex 

34 The multiplication of the two values 

35 """ 

36 return multiply(self.value, value) 

37 

38 

39class Dividor: 

40 """ 

41 Docstring for Dividor 

42 """ 

43 

44 def __init__(self, value: int | float | complex): 

45 """Create an dividor class that divides specific value from numbers 

46 

47 Parameters 

48 ---------- 

49 value : int | float | complex 

50 A value that will be divided from any input 

51 """ 

52 self.value = value 

53 

54 def divide(self, value: int | float | complex): 

55 """Divides a value 

56 

57 Parameters 

58 ---------- 

59 value : int | float | complex 

60 A value to divide from 

61 

62 Returns 

63 ------- 

64 ratio : int | float | complex 

65 The division of the two values 

66 """ 

67 return divide(value, self.value)