MCPcopy Create free account
hub / github.com/apache/fory / get_languages

Function get_languages

compiler/fory_compiler/cli.py:690–704  ·  view source on GitHub ↗

Parse the language argument into a list of languages.

(lang_arg: str)

Source from the content-addressed store, hash-verified

688
689
690def get_languages(lang_arg: str) -> List[str]:
691 """Parse the language argument into a list of languages."""
692 if lang_arg == "all":
693 return list(GENERATORS.keys())
694
695 languages = [lang.strip().lower() for lang in lang_arg.split(",")]
696
697 # Validate languages
698 invalid = [lang for lang in languages if lang not in GENERATORS]
699 if invalid:
700 print(f"Error: Unknown language(s): {', '.join(invalid)}", file=sys.stderr)
701 print(f"Available: {', '.join(GENERATORS.keys())}", file=sys.stderr)
702 sys.exit(1)
703
704 return languages
705
706
707def compile_file(

Callers 1

cmd_compileFunction · 0.85

Calls 2

listFunction · 0.50
keysMethod · 0.45

Tested by

no test coverage detected