(self)
| 1064 | return self |
| 1065 | |
| 1066 | def add_hash(self): |
| 1067 | script, globs = _make_hash_script( |
| 1068 | self._cls, |
| 1069 | self._attrs, |
| 1070 | frozen=self._frozen, |
| 1071 | cache_hash=self._cache_hash, |
| 1072 | ) |
| 1073 | |
| 1074 | def attach_hash(cls_dict: dict, locs: dict) -> None: |
| 1075 | cls_dict["__hash__"] = self._add_method_dunders(locs["__hash__"]) |
| 1076 | |
| 1077 | self._script_snippets.append((script, globs, attach_hash)) |
| 1078 | |
| 1079 | return self |
| 1080 | |
| 1081 | def add_init(self): |
| 1082 | script, globs, annotations = _make_init_script( |