MCPcopy
hub / github.com/python-attrs/attrs / add_eq

Method add_eq

src/attr/_make.py:1142–1154  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1140 return self
1141
1142 def add_eq(self):
1143 cd = self._cls_dict
1144
1145 script, globs = _make_eq_script(self._attrs)
1146
1147 def _attach_eq(cls_dict, globs):
1148 cls_dict["__eq__"] = self._add_method_dunders(globs["__eq__"])
1149
1150 self._script_snippets.append((script, globs, _attach_eq))
1151
1152 cd["__ne__"] = __ne__
1153
1154 return self
1155
1156 def add_order(self):
1157 cd = self._cls_dict

Callers 2

wrapFunction · 0.80
test_returns_selfMethod · 0.80

Calls 1

_make_eq_scriptFunction · 0.85

Tested by 1

test_returns_selfMethod · 0.64