argenta 1.1.1rc0__py3-none-any.whl → 1.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- argenta/__init__.py +6 -0
- argenta/app/__init__.py +10 -1
- argenta/app/autocompleter/entity.py +18 -19
- argenta/app/defaults.py +0 -1
- argenta/app/dividing_line/models.py +5 -5
- argenta/app/models.py +226 -140
- argenta/app/protocols.py +22 -0
- argenta/app/registered_routers/entity.py +7 -14
- argenta/command/__init__.py +11 -2
- argenta/command/exceptions.py +20 -13
- argenta/command/flag/__init__.py +5 -11
- argenta/command/flag/defaults.py +19 -24
- argenta/command/flag/flags/__init__.py +2 -8
- argenta/command/flag/flags/models.py +65 -49
- argenta/command/flag/models.py +78 -93
- argenta/command/models.py +100 -144
- argenta/di/__init__.py +2 -0
- argenta/di/integration.py +45 -0
- argenta/di/providers.py +14 -0
- argenta/metrics/main.py +2 -2
- argenta/orchestrator/__init__.py +2 -2
- argenta/orchestrator/argparser/__init__.py +6 -1
- argenta/orchestrator/argparser/arguments/__init__.py +3 -3
- argenta/orchestrator/argparser/arguments/models.py +61 -35
- argenta/orchestrator/argparser/entity.py +56 -37
- argenta/orchestrator/entity.py +20 -18
- argenta/py.typed +0 -0
- argenta/response/__init__.py +2 -2
- argenta/response/entity.py +17 -18
- argenta/response/status.py +12 -1
- argenta/router/__init__.py +2 -2
- argenta/router/command_handler/entity.py +9 -27
- argenta/router/entity.py +133 -160
- argenta/router/exceptions.py +9 -12
- {argenta-1.1.1rc0.dist-info → argenta-1.1.2.dist-info}/METADATA +12 -5
- argenta-1.1.2.dist-info/RECORD +44 -0
- argenta-1.1.1rc0.dist-info/RECORD +0 -39
- {argenta-1.1.1rc0.dist-info → argenta-1.1.2.dist-info}/WHEEL +0 -0
- {argenta-1.1.1rc0.dist-info → argenta-1.1.2.dist-info}/licenses/LICENSE +0 -0
argenta/command/__init__.py
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
-
__all__ = [
|
1
|
+
__all__ = [
|
2
|
+
"Command",
|
3
|
+
"PossibleValues",
|
4
|
+
"PredefinedFlags",
|
5
|
+
"InputCommand",
|
6
|
+
"Flags",
|
7
|
+
"Flag"
|
8
|
+
]
|
2
9
|
|
3
|
-
from argenta.command.models import Command
|
10
|
+
from argenta.command.models import Command, InputCommand
|
11
|
+
from argenta.command.flag import defaults as PredefinedFlags
|
12
|
+
from argenta.command.flag import (Flag, Flags, PossibleValues)
|
argenta/command/exceptions.py
CHANGED
@@ -1,42 +1,49 @@
|
|
1
1
|
from argenta.command.flag.models import Flag, InputFlag
|
2
|
+
from abc import ABC, abstractmethod
|
3
|
+
from typing import override
|
2
4
|
|
3
5
|
|
4
|
-
class
|
6
|
+
class InputCommandException(ABC, Exception):
|
5
7
|
"""
|
6
8
|
Private. Base exception class for all exceptions raised when parse input command
|
7
9
|
"""
|
10
|
+
@override
|
11
|
+
@abstractmethod
|
12
|
+
def __str__(self) -> str:
|
13
|
+
raise NotImplementedError
|
8
14
|
|
9
|
-
pass
|
10
15
|
|
11
|
-
|
12
|
-
class UnprocessedInputFlagException(BaseInputCommandException):
|
16
|
+
class UnprocessedInputFlagException(InputCommandException):
|
13
17
|
"""
|
14
18
|
Private. Raised when an unprocessed input flag is detected
|
15
19
|
"""
|
16
|
-
|
17
|
-
def __str__(self):
|
20
|
+
@override
|
21
|
+
def __str__(self) -> str:
|
18
22
|
return "Unprocessed Input Flags"
|
19
23
|
|
20
24
|
|
21
|
-
class RepeatedInputFlagsException(
|
25
|
+
class RepeatedInputFlagsException(InputCommandException):
|
22
26
|
"""
|
23
27
|
Private. Raised when repeated input flags are detected
|
24
28
|
"""
|
25
29
|
|
26
30
|
def __init__(self, flag: Flag | InputFlag):
|
27
|
-
self.flag = flag
|
31
|
+
self.flag: Flag | InputFlag = flag
|
32
|
+
super().__init__()
|
28
33
|
|
29
|
-
|
34
|
+
@override
|
35
|
+
def __str__(self) -> str:
|
36
|
+
string_entity: str = self.flag.string_entity
|
30
37
|
return (
|
31
38
|
"Repeated Input Flags\n"
|
32
|
-
f"Duplicate flag was detected in the input: '{
|
39
|
+
f"Duplicate flag was detected in the input: '{string_entity}'"
|
33
40
|
)
|
34
41
|
|
35
42
|
|
36
|
-
class EmptyInputCommandException(
|
43
|
+
class EmptyInputCommandException(InputCommandException):
|
37
44
|
"""
|
38
45
|
Private. Raised when an empty input command is detected
|
39
46
|
"""
|
40
|
-
|
41
|
-
def __str__(self):
|
47
|
+
@override
|
48
|
+
def __str__(self) -> str:
|
42
49
|
return "Input Command is empty"
|
argenta/command/flag/__init__.py
CHANGED
@@ -1,17 +1,11 @@
|
|
1
1
|
__all__ = [
|
2
2
|
"Flag",
|
3
3
|
"InputFlag",
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"
|
7
|
-
"Flags", "PossibleValues"
|
4
|
+
"Flags",
|
5
|
+
"PossibleValues",
|
6
|
+
"ValidationStatus"
|
8
7
|
]
|
9
8
|
|
10
9
|
|
11
|
-
from argenta.command.flag.models import Flag, InputFlag, PossibleValues
|
12
|
-
from argenta.command.flag.flags.models import
|
13
|
-
UndefinedInputFlags,
|
14
|
-
ValidInputFlags,
|
15
|
-
Flags,
|
16
|
-
InvalidValueInputFlags,
|
17
|
-
)
|
10
|
+
from argenta.command.flag.models import Flag, InputFlag, PossibleValues, ValidationStatus
|
11
|
+
from argenta.command.flag.flags.models import Flags
|
argenta/command/flag/defaults.py
CHANGED
@@ -1,32 +1,27 @@
|
|
1
|
-
from
|
1
|
+
from typing import Literal
|
2
2
|
from argenta.command.flag.models import Flag, PossibleValues
|
3
|
-
import re
|
3
|
+
import re
|
4
4
|
|
5
5
|
|
6
|
+
DEFAULT_PREFIX: Literal["-", "--", "---"] = "-"
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
"""
|
10
|
-
Public. A dataclass with predefined flags and most frequently used flags for quick use
|
11
|
-
"""
|
8
|
+
HELP = Flag(name="help", possible_values=PossibleValues.NEITHER)
|
9
|
+
SHORT_HELP = Flag(name="H", prefix=DEFAULT_PREFIX, possible_values=PossibleValues.NEITHER)
|
12
10
|
|
13
|
-
|
14
|
-
|
11
|
+
INFO = Flag(name="info", possible_values=PossibleValues.NEITHER) # noqa: WPS110
|
12
|
+
SHORT_INFO = Flag(name="I", prefix=DEFAULT_PREFIX, possible_values=PossibleValues.NEITHER)
|
15
13
|
|
16
|
-
|
17
|
-
|
14
|
+
ALL = Flag(name="all", possible_values=PossibleValues.NEITHER)
|
15
|
+
SHORT_ALL = Flag(name="A", prefix=DEFAULT_PREFIX, possible_values=PossibleValues.NEITHER)
|
18
16
|
|
19
|
-
|
20
|
-
|
17
|
+
HOST = Flag(
|
18
|
+
name="host", possible_values=re.compile(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$")
|
19
|
+
)
|
20
|
+
SHORT_HOST = Flag(
|
21
|
+
name="H",
|
22
|
+
prefix=DEFAULT_PREFIX,
|
23
|
+
possible_values=re.compile(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$"),
|
24
|
+
)
|
21
25
|
|
22
|
-
|
23
|
-
|
24
|
-
)
|
25
|
-
SHORT_HOST = Flag(
|
26
|
-
name="H",
|
27
|
-
prefix="-",
|
28
|
-
possible_values=re.compile(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$"),
|
29
|
-
)
|
30
|
-
|
31
|
-
PORT = Flag(name="port", possible_values=re.compile(r"^\d{1,5}$"))
|
32
|
-
SHORT_PORT = Flag(name="P", prefix="-", possible_values=re.compile(r"^\d{1,5}$"))
|
26
|
+
PORT = Flag(name="port", possible_values=re.compile(r"^\d{1,5}$"))
|
27
|
+
SHORT_PORT = Flag(name="P", prefix=DEFAULT_PREFIX, possible_values=re.compile(r"^\d{1,5}$"))
|
@@ -1,16 +1,10 @@
|
|
1
1
|
__all__ = [
|
2
2
|
"Flags",
|
3
|
-
"InputFlags"
|
4
|
-
"UndefinedInputFlags",
|
5
|
-
"InvalidValueInputFlags",
|
6
|
-
"ValidInputFlags",
|
3
|
+
"InputFlags"
|
7
4
|
]
|
8
5
|
|
9
6
|
|
10
7
|
from argenta.command.flag.flags.models import (
|
11
8
|
Flags,
|
12
|
-
InputFlags
|
13
|
-
UndefinedInputFlags,
|
14
|
-
InvalidValueInputFlags,
|
15
|
-
ValidInputFlags,
|
9
|
+
InputFlags
|
16
10
|
)
|
@@ -1,90 +1,106 @@
|
|
1
1
|
from argenta.command.flag.models import InputFlag, Flag
|
2
|
-
from typing import Generic, TypeVar
|
2
|
+
from typing import Generic, TypeVar, override
|
3
|
+
from collections.abc import Iterator
|
3
4
|
|
4
5
|
|
5
6
|
FlagType = TypeVar("FlagType")
|
6
7
|
|
7
8
|
|
8
9
|
class BaseFlags(Generic[FlagType]):
|
9
|
-
def __init__(self,
|
10
|
+
def __init__(self, flags: list[FlagType] | None = None) -> None:
|
10
11
|
"""
|
11
12
|
Public. A model that combines the registered flags
|
12
13
|
:param flags: the flags that will be registered
|
13
14
|
:return: None
|
14
15
|
"""
|
15
|
-
self.
|
16
|
+
self.flags: list[FlagType] = flags if flags else []
|
16
17
|
|
17
|
-
def
|
18
|
-
"""
|
19
|
-
Public. Returns a list of flags
|
20
|
-
:return: list of flags as list[FlagType]
|
21
|
-
"""
|
22
|
-
return self._flags
|
23
|
-
|
24
|
-
def add_flag(self, flag: FlagType):
|
18
|
+
def add_flag(self, flag: FlagType) -> None:
|
25
19
|
"""
|
26
20
|
Public. Adds a flag to the list of flags
|
27
21
|
:param flag: flag to add
|
28
22
|
:return: None
|
29
23
|
"""
|
30
|
-
self.
|
24
|
+
self.flags.append(flag)
|
31
25
|
|
32
|
-
def add_flags(self, flags: list[FlagType]):
|
26
|
+
def add_flags(self, flags: list[FlagType]) -> None:
|
33
27
|
"""
|
34
28
|
Public. Adds a list of flags to the list of flags
|
35
29
|
:param flags: list of flags to add
|
36
30
|
:return: None
|
37
31
|
"""
|
38
|
-
self.
|
32
|
+
self.flags.extend(flags)
|
33
|
+
|
34
|
+
def __iter__(self) -> Iterator[FlagType]:
|
35
|
+
return iter(self.flags)
|
36
|
+
|
37
|
+
def __next__(self) -> FlagType:
|
38
|
+
return next(iter(self))
|
39
|
+
|
40
|
+
def __getitem__(self, flag_index: int) -> FlagType:
|
41
|
+
return self.flags[flag_index]
|
42
|
+
|
43
|
+
def __bool__(self) -> bool:
|
44
|
+
return bool(self.flags)
|
39
45
|
|
40
|
-
|
46
|
+
|
47
|
+
class Flags(BaseFlags[Flag]):
|
48
|
+
def get_flag_by_name(self, name: str) -> Flag | None:
|
41
49
|
"""
|
42
50
|
Public. Returns the flag entity by its name or None if not found
|
43
51
|
:param name: the name of the flag to get
|
44
52
|
:return: entity of the flag or None
|
45
53
|
"""
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
return next(iter(self))
|
56
|
-
|
57
|
-
def __getitem__(self, item):
|
58
|
-
return self._flags[item]
|
54
|
+
return next((flag for flag in self.flags if flag.name == name), None)
|
55
|
+
|
56
|
+
@override
|
57
|
+
def __eq__(self, other: object) -> bool:
|
58
|
+
if not isinstance(other, Flags):
|
59
|
+
return NotImplemented
|
60
|
+
|
61
|
+
if len(self.flags) != len(other.flags):
|
62
|
+
return False
|
59
63
|
|
60
|
-
|
61
|
-
return
|
64
|
+
flag_pairs: zip[tuple[Flag, Flag]] = zip(self.flags, other.flags)
|
65
|
+
return all(s_flag == o_flag for s_flag, o_flag in flag_pairs)
|
62
66
|
|
63
|
-
def
|
64
|
-
if
|
67
|
+
def __contains__(self, flag_to_check: object) -> bool:
|
68
|
+
if isinstance(flag_to_check, Flag):
|
69
|
+
for flag in self.flags:
|
70
|
+
if flag == flag_to_check:
|
71
|
+
return True
|
65
72
|
return False
|
66
73
|
else:
|
67
|
-
|
68
|
-
if not flag == other_flag:
|
69
|
-
return False
|
70
|
-
return True
|
71
|
-
|
72
|
-
|
73
|
-
class Flags(BaseFlags[Flag]):
|
74
|
-
pass
|
74
|
+
raise TypeError
|
75
75
|
|
76
76
|
|
77
77
|
class InputFlags(BaseFlags[InputFlag]):
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
78
|
+
def get_flag_by_name(self, name: str) -> InputFlag | None:
|
79
|
+
"""
|
80
|
+
Public. Returns the flag entity by its name or None if not found
|
81
|
+
:param name: the name of the flag to get
|
82
|
+
:return: entity of the flag or None
|
83
|
+
"""
|
84
|
+
return next((flag for flag in self.flags if flag.name == name), None)
|
85
|
+
|
86
|
+
@override
|
87
|
+
def __eq__(self, other: object) -> bool:
|
88
|
+
if not isinstance(other, InputFlags):
|
89
|
+
raise NotImplementedError
|
90
|
+
|
91
|
+
if len(self.flags) != len(other.flags):
|
92
|
+
return False
|
83
93
|
|
94
|
+
paired_flags: zip[tuple[InputFlag, InputFlag]] = zip(self.flags, other.flags)
|
84
95
|
|
85
|
-
|
86
|
-
pass
|
96
|
+
return all(my_flag == other_flag for my_flag, other_flag in paired_flags)
|
87
97
|
|
98
|
+
def __contains__(self, ingressable_item: object) -> bool:
|
99
|
+
if isinstance(ingressable_item, InputFlag):
|
100
|
+
for flag in self.flags:
|
101
|
+
if flag == ingressable_item:
|
102
|
+
return True
|
103
|
+
return False
|
104
|
+
else:
|
105
|
+
raise TypeError
|
88
106
|
|
89
|
-
class InvalidValueInputFlags(InputFlags):
|
90
|
-
pass
|
argenta/command/flag/models.py
CHANGED
@@ -1,57 +1,22 @@
|
|
1
1
|
from enum import Enum
|
2
|
-
from
|
3
|
-
|
2
|
+
from re import Pattern
|
3
|
+
from typing import Literal, override
|
4
4
|
|
5
5
|
|
6
6
|
class PossibleValues(Enum):
|
7
|
-
|
8
|
-
ALL
|
9
|
-
|
10
|
-
def __eq__(self, other: bool) -> bool:
|
11
|
-
return self.value == other
|
12
|
-
|
13
|
-
|
14
|
-
class BaseFlag:
|
15
|
-
def __init__(self, name: str, prefix: Literal["-", "--", "---"] = "--") -> None:
|
16
|
-
"""
|
17
|
-
Private. Base class for flags
|
18
|
-
:param name: the name of the flag
|
19
|
-
:param prefix: the prefix of the flag
|
20
|
-
:return: None
|
21
|
-
"""
|
22
|
-
self._name = name
|
23
|
-
self._prefix = prefix
|
24
|
-
|
25
|
-
def get_string_entity(self) -> str:
|
26
|
-
"""
|
27
|
-
Public. Returns a string representation of the flag
|
28
|
-
:return: string representation of the flag as str
|
29
|
-
"""
|
30
|
-
string_entity: str = self._prefix + self._name
|
31
|
-
return string_entity
|
7
|
+
NEITHER = 'NEITHER'
|
8
|
+
ALL = 'ALL'
|
32
9
|
|
33
|
-
def get_name(self) -> str:
|
34
|
-
"""
|
35
|
-
Public. Returns the name of the flag
|
36
|
-
:return: the name of the flag as str
|
37
|
-
"""
|
38
|
-
return self._name
|
39
|
-
|
40
|
-
def get_prefix(self) -> str:
|
41
|
-
"""
|
42
|
-
Public. Returns the prefix of the flag
|
43
|
-
:return: the prefix of the flag as str
|
44
|
-
"""
|
45
|
-
return self._prefix
|
46
10
|
|
47
|
-
|
48
|
-
|
11
|
+
class ValidationStatus(Enum):
|
12
|
+
VALID = 'VALID'
|
13
|
+
INVALID = 'INVALID'
|
14
|
+
UNDEFINED = 'UNDEFINED'
|
49
15
|
|
50
16
|
|
51
|
-
class Flag
|
17
|
+
class Flag:
|
52
18
|
def __init__(
|
53
|
-
self,
|
54
|
-
name: str,
|
19
|
+
self, name: str, *,
|
55
20
|
prefix: Literal["-", "--", "---"] = "--",
|
56
21
|
possible_values: list[str] | Pattern[str] | PossibleValues = PossibleValues.ALL,
|
57
22
|
) -> None:
|
@@ -62,45 +27,58 @@ class Flag(BaseFlag):
|
|
62
27
|
:param possible_values: The possible values of the flag, if False then the flag cannot have a value
|
63
28
|
:return: None
|
64
29
|
"""
|
65
|
-
|
66
|
-
self.
|
30
|
+
self.name: str = name
|
31
|
+
self.prefix: Literal["-", "--", "---"] = prefix
|
32
|
+
self.possible_values: list[str] | Pattern[str] | PossibleValues = possible_values
|
67
33
|
|
68
|
-
def validate_input_flag_value(self, input_flag_value: str | None):
|
34
|
+
def validate_input_flag_value(self, input_flag_value: str | None) -> bool:
|
69
35
|
"""
|
70
36
|
Private. Validates the input flag value
|
71
37
|
:param input_flag_value: The input flag value to validate
|
72
38
|
:return: whether the entered flag is valid as bool
|
73
39
|
"""
|
74
|
-
if self.possible_values == PossibleValues.
|
75
|
-
|
76
|
-
return True
|
77
|
-
else:
|
78
|
-
return False
|
79
|
-
elif isinstance(self.possible_values, Pattern):
|
80
|
-
if isinstance(input_flag_value, str):
|
81
|
-
is_valid = bool(self.possible_values.match(input_flag_value))
|
82
|
-
if bool(is_valid):
|
83
|
-
return True
|
84
|
-
else:
|
85
|
-
return False
|
86
|
-
else:
|
87
|
-
return False
|
40
|
+
if self.possible_values == PossibleValues.NEITHER:
|
41
|
+
return input_flag_value is None
|
88
42
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
43
|
+
if isinstance(self.possible_values, Pattern):
|
44
|
+
return isinstance(input_flag_value, str) and bool(self.possible_values.match(input_flag_value))
|
45
|
+
|
46
|
+
if isinstance(self.possible_values, list):
|
47
|
+
return input_flag_value in self.possible_values
|
48
|
+
|
49
|
+
return True
|
50
|
+
|
51
|
+
@property
|
52
|
+
def string_entity(self) -> str:
|
53
|
+
"""
|
54
|
+
Public. Returns a string representation of the flag
|
55
|
+
:return: string representation of the flag as str
|
56
|
+
"""
|
57
|
+
string_entity: str = self.prefix + self.name
|
58
|
+
return string_entity
|
59
|
+
|
60
|
+
@override
|
61
|
+
def __str__(self) -> str:
|
62
|
+
return self.string_entity
|
63
|
+
|
64
|
+
@override
|
65
|
+
def __repr__(self) -> str:
|
66
|
+
return f'Flag<name={self.name}, prefix={self.prefix}>'
|
67
|
+
|
68
|
+
@override
|
69
|
+
def __eq__(self, other: object) -> bool:
|
70
|
+
if isinstance(other, Flag):
|
71
|
+
return self.string_entity == other.string_entity
|
94
72
|
else:
|
95
|
-
|
73
|
+
raise NotImplementedError
|
96
74
|
|
97
75
|
|
98
|
-
class InputFlag
|
76
|
+
class InputFlag:
|
99
77
|
def __init__(
|
100
|
-
self,
|
101
|
-
|
102
|
-
|
103
|
-
|
78
|
+
self, name: str, *,
|
79
|
+
prefix: Literal['-', '--', '---'] = '--',
|
80
|
+
input_value: str | None,
|
81
|
+
status: ValidationStatus | None
|
104
82
|
):
|
105
83
|
"""
|
106
84
|
Public. The entity of the flag of the entered command
|
@@ -109,26 +87,33 @@ class InputFlag(BaseFlag):
|
|
109
87
|
:param value: the value of the input flag
|
110
88
|
:return: None
|
111
89
|
"""
|
112
|
-
|
113
|
-
self.
|
114
|
-
|
115
|
-
|
90
|
+
self.name: str = name
|
91
|
+
self.prefix: Literal['-', '--', '---'] = prefix
|
92
|
+
self.input_value: str | None = input_value
|
93
|
+
self.status: ValidationStatus | None = status
|
94
|
+
|
95
|
+
@property
|
96
|
+
def string_entity(self) -> str:
|
116
97
|
"""
|
117
|
-
Public. Returns
|
118
|
-
:return:
|
119
|
-
"""
|
120
|
-
return self._flag_value
|
121
|
-
|
122
|
-
def set_value(self, value):
|
123
|
-
"""
|
124
|
-
Private. Sets the value of the flag
|
125
|
-
:param value: the fag value to set
|
126
|
-
:return: None
|
98
|
+
Public. Returns a string representation of the flag
|
99
|
+
:return: string representation of the flag as str
|
127
100
|
"""
|
128
|
-
self.
|
101
|
+
string_entity: str = self.prefix + self.name
|
102
|
+
return string_entity
|
129
103
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
104
|
+
@override
|
105
|
+
def __str__(self) -> str:
|
106
|
+
return f'{self.string_entity} {self.input_value}'
|
107
|
+
|
108
|
+
@override
|
109
|
+
def __repr__(self) -> str:
|
110
|
+
return f'InputFlag<name={self.name}, prefix={self.prefix}, value={self.input_value}, status={self.status}>'
|
111
|
+
|
112
|
+
@override
|
113
|
+
def __eq__(self, other: object) -> bool:
|
114
|
+
if isinstance(other, InputFlag):
|
115
|
+
return (
|
116
|
+
self.name == other.name
|
117
|
+
)
|
118
|
+
else:
|
119
|
+
raise NotImplementedError
|