(self)
| 86 | |
| 87 | @property |
| 88 | def type(self) -> Optional[ArgumentType]: |
| 89 | if not self._type: |
| 90 | if not self.mutation: |
| 91 | raise ValueError( |
| 92 | f"Cannot infer 'type' of {self} when there is no mutation attached. Consider providing a type manually." |
| 93 | ) |
| 94 | |
| 95 | i = 0 |
| 96 | goal = self.index |
| 97 | for token in parse_proc_code(self.mutation.proc_code): |
| 98 | if isinstance(token, ArgumentType): |
| 99 | if i == goal: |
| 100 | self._type = token |
| 101 | break |
| 102 | i += 1 |
| 103 | |
| 104 | return self._type |
| 105 | |
| 106 | @staticmethod |
| 107 | def from_json(data: dict | list | Any): |
nothing calls this directly
no test coverage detected