mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-08-06 22:32:54 +02:00
created raw implementation, but it's raw either or either.
This commit is contained in:
@ -16,31 +16,17 @@ class info():
|
||||
|
||||
__version__ = info.version
|
||||
|
||||
def _process(proc_data: List[Dict]) -> List[Dict]:
|
||||
def _process(proc_data: dict) -> dict:
|
||||
"""
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (List of Dictionaries) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Structured data to conform to the schema:
|
||||
dictionary of amixer sget <control_name>
|
||||
"""
|
||||
# int_list = {'expires'}
|
||||
#
|
||||
# # in BSD style, change name to null if it is a question mark
|
||||
# for entry in proc_data:
|
||||
# if 'name' in entry and entry['name'] == '?':
|
||||
# entry['name'] = None
|
||||
#
|
||||
# for key in entry:
|
||||
# if key in int_list:
|
||||
# entry[key] = jc.utils.convert_to_int(entry[key])
|
||||
#
|
||||
# return proc_data
|
||||
pass
|
||||
return proc_data
|
||||
|
||||
|
||||
def parse(
|
||||
@ -174,8 +160,7 @@ def parse(
|
||||
"dB": db_value,
|
||||
"status": status
|
||||
}
|
||||
|
||||
return mapping
|
||||
return _process(mapping) if raw else mapping
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Reference in New Issue
Block a user