MCPcopy Create free account
hub / github.com/ctf-wiki/ctf-wiki / lang_callback

Function lang_callback

scripts/docs.py:39–46  ·  view source on GitHub ↗
(lang: Optional[str])

Source from the content-addressed store, hash-verified

37
38
39def lang_callback(lang: Optional[str]):
40 if lang is None:
41 return
42 if not lang.isalpha() or len(lang) != 2:
43 typer.echo("Use a 2 letter language code, like: es")
44 raise typer.Abort()
45 lang = lang.lower()
46 return lang
47
48
49def complete_existing_lang(incomplete: str):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected