Stashes the signature of 'dataclasses.replace(...)' for this specific dataclass to be used later whenever 'dataclasses.replace' is called for this dataclass.
(self, attributes: list[DataclassAttribute])
| 414 | ) |
| 415 | |
| 416 | def _add_internal_replace_method(self, attributes: list[DataclassAttribute]) -> None: |
| 417 | """ |
| 418 | Stashes the signature of 'dataclasses.replace(...)' for this specific dataclass |
| 419 | to be used later whenever 'dataclasses.replace' is called for this dataclass. |
| 420 | """ |
| 421 | add_method_to_class( |
| 422 | self._api, |
| 423 | self._cls, |
| 424 | _INTERNAL_REPLACE_SYM_NAME, |
| 425 | args=[attr.to_argument(self._cls.info, of="replace") for attr in attributes], |
| 426 | return_type=NoneType(), |
| 427 | is_staticmethod=True, |
| 428 | ) |
| 429 | |
| 430 | def _add_internal_post_init_method(self, attributes: list[DataclassAttribute]) -> None: |
| 431 | add_method_to_class( |
no test coverage detected