(key: 'OptionKey')
Classify arguments into groups so we know which dict to assign them to.
Classify arguments into groups so we know which dict to assign them to.
Classify arguments into groups so we know which dict to assign them to .
def _classify_argument(key: 'OptionKey') -> OptionType:
    """Classify arguments into groups so we know which dict to assign them to."""

    if key.name.startswith('b_'):
        return OptionType.BASE
    elif key.lang is not None:
        return OptionType.COMPILER
    elif key.name in _BUILTIN_NAMES or key.module:
        return OptionType.BUILTIN
    elif key.name.startswith('backend_'):
        assert key.machine is MachineChoice.HOST, str(key)
        return OptionType.BACKEND
    else:
        assert key.machine is MachineChoice.HOST, str(key)
        return OptionType.PROJECT
def _classify_argument ( key : 'OptionKey' ) -> OptionType : if key . name . startswith ( 'b_' ) : return OptionType . BASE elif key . lang is not None : return OptionType . COMPILER elif key . name in _BUILTIN_NAMES or key . module : return OptionType . BUILTIN elif key . name . startswith ( 'backend_' ) : assert key . machine is MachineChoice . HOST , str ( key ) return OptionType . BACKEND else : assert key . machine is MachineChoice . HOST , str ( key ) return OptionType . PROJECT