none
The “none” type is used for command with no arguments.
Device Profile
Example of a “none” value type in a device profile:
profile = {
# ...
"settings": {
"rainbow_effect": {
"label": "rainbow effect",
"description": "Enable the rainbow effect (can be disabled by setting a color)",
"cli": ["-e", "--rainbow-effect"],
"report_type": usbhid.HID_REPORT_TYPE_OUTPUT,
"command": [0x22, 0xFF],
"value_type": "none",
},
},
# ...
}
CLI
Example of CLI option generated with this handler:
-e, --rainbow-effect Enable the rainbow effect (can be disabled by setting
a color)
Example of CLI usage:
rivalcfg --rainbow-effect
Functions
- rivalcfg.handlers.none.add_cli_option(cli_parser, setting_name, setting_info)
Add the given “none” type setting to the given CLI arguments parser.
- Parameters:
cli_parser (ArgumentParser) – An
ArgumentParser
instance.setting_name (str) – The name of the setting.
setting_info (dict) – The information dict of the setting from the device profile.
- rivalcfg.handlers.none.process_value(setting_info, *args)
Called by the
rivalcfg.mouse.Mouse
class when processing a “none” type setting.- Parameters:
setting_info (dict) – The information dict of the setting from the device profile.
- Return type:
list[]