(
self,
code,
reverse_code=None,
*,
atomic: bool | None = None,
)
| 1080 | reduces_to_sql = False |
| 1081 | |
| 1082 | def __init__( |
| 1083 | self, |
| 1084 | code, |
| 1085 | reverse_code=None, |
| 1086 | *, |
| 1087 | atomic: bool | None = None, |
| 1088 | ) -> None: |
| 1089 | if not callable(code): |
| 1090 | raise ValueError("RunPython must be supplied with a callable") |
| 1091 | if reverse_code is not None and not callable(reverse_code): |
| 1092 | raise ValueError("RunPython must be supplied with callable arguments") |
| 1093 | self.code = code |
| 1094 | self.reverse_code = reverse_code |
| 1095 | self.atomic = atomic |
| 1096 | self.reversible = reverse_code is not None |
| 1097 | |
| 1098 | def describe(self) -> str: |
| 1099 | return "Run Python code" |
nothing calls this directly
no outgoing calls
no test coverage detected