| 786 | self.method_kwargs = kwargs |
| 787 | |
| 788 | def call(self, instance, step, context): |
| 789 | if not context.value_provided: |
| 790 | if self.method_arg is NotProvided: |
| 791 | args = () |
| 792 | else: |
| 793 | args = (self.method_arg,) |
| 794 | else: |
| 795 | args = (context.value,) |
| 796 | |
| 797 | kwargs = dict(self.method_kwargs) |
| 798 | kwargs.update(context.extra) |
| 799 | method = getattr(instance, self.method_name) |
| 800 | logger.debug( |
| 801 | "PostGenerationMethodCall: Calling %r.%s(%s)", |
| 802 | instance, |
| 803 | self.method_name, |
| 804 | utils.log_pprint(args, kwargs), |
| 805 | ) |
| 806 | return method(*args, **kwargs) |