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

Function normalize_args

compiler/fory_compiler/cli.py:673–687  ·  view source on GitHub ↗

Normalize args so compile is the default command.

(args: Optional[List[str]])

Source from the content-addressed store, hash-verified

671
672
673def normalize_args(args: Optional[List[str]]) -> List[str]:
674 """Normalize args so compile is the default command."""
675 if args is None:
676 args = sys.argv[1:]
677 if not args:
678 return []
679 if args[0] in {"-h", "--help"}:
680 return args
681 if args[0] == "--scan-generated":
682 return args
683 if args[0] == "scan-generated":
684 return ["--scan-generated", *args[1:]]
685 if args[0] == "compile":
686 return args[1:]
687 return args
688
689
690def get_languages(lang_arg: str) -> List[str]:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected