(self, *args, **kwargs)
| 53 | |
| 54 | @functools.wraps(init_func) |
| 55 | def wrapped(self, *args, **kwargs): |
| 56 | try: |
| 57 | from_config_func = type(self).from_config |
| 58 | except AttributeError as e: |
| 59 | raise AttributeError( |
| 60 | "Class with @configurable must have a 'from_config' classmethod." |
| 61 | ) from e |
| 62 | if not inspect.ismethod(from_config_func): |
| 63 | raise TypeError("Class with @configurable must have a 'from_config' classmethod.") |
| 64 | |
| 65 | # import ipdb; ipdb.set_trace() |
| 66 | if _called_with_cfg(*args, **kwargs): |
| 67 | explicit_args = _get_args_from_config(from_config_func, *args, **kwargs) |
| 68 | init_func(self, **explicit_args) |
| 69 | else: |
| 70 | init_func(self, *args, **kwargs) |
| 71 | |
| 72 | return wrapped |
| 73 |
nothing calls this directly
no test coverage detected