(
command: Annotated[str | None, typer.Option(envvar="COMMAND")] = None,
)
| 274 | |
| 275 | @app.command() |
| 276 | def commands_json( |
| 277 | command: Annotated[str | None, typer.Option(envvar="COMMAND")] = None, |
| 278 | ) -> None: |
| 279 | available_commands = [ |
| 280 | "translate-page", |
| 281 | "translate-lang", |
| 282 | "update-outdated", |
| 283 | "add-missing", |
| 284 | "update-and-add", |
| 285 | "remove-removable", |
| 286 | ] |
| 287 | default_commands = [ |
| 288 | "remove-removable", |
| 289 | "update-outdated", |
| 290 | "add-missing", |
| 291 | ] |
| 292 | if command: |
| 293 | if command in available_commands: |
| 294 | print(json.dumps([command])) |
| 295 | return |
| 296 | else: |
| 297 | raise typer.Exit(code=1) |
| 298 | print(json.dumps(default_commands)) |
| 299 | |
| 300 | |
| 301 | @app.command() |
nothing calls this directly
no test coverage detected
searching dependent graphs…