| 175 | return sig.replace(parameters=params[1:]) |
| 176 | |
| 177 | def fill_implicit_positionals( |
| 178 | self, positional: Optional[Iterable[str]] |
| 179 | ) -> Iterable[str]: |
| 180 | # If positionals is None, everything lacking a default |
| 181 | # value will be automatically considered positional. |
| 182 | if positional is None: |
| 183 | positional = [ |
| 184 | x.name |
| 185 | for x in self.argspec(self.body).parameters.values() |
| 186 | if x.default is inspect.Signature.empty |
| 187 | ] |
| 188 | return positional |
| 189 | |
| 190 | def arg_opts( |
| 191 | self, name: str, default: str, taken_names: Set[str] |