<commit_before>import logging
from typing import List
from configparser import SectionProxy

from .common import InputDevice, OutputDevice, lerp_range
from .temperaturecontroller import TemperatureController
from .lmsensorsdevice import LMSensorsInput, LMSensorsOutput
from .hddtemp import HDDTemp
from .serialoutput import SerialOutput

log = logging.getLogger(__name__)


def determine_inputs(device_config: SectionProxy) -> List[InputDevice]:
    input_devices = []
    if device_config.get('inputType') == 'componentTemp':
        specific_devices = [k.strip() for k in device_config.get('temperatureMonitorDeviceName').split(',')]
        for idx, path in enumerate([k.strip() for k in device_config.get('temperatureMonitor').split(',')]):
            input_devices.extend(LMSensorsInput.from_path(specific_devices[idx], path))
    elif device_config.get('inputType') == 'hddtemp':
        input_devices.append(HDDTemp())
    else:
        raise ValueError('No Input device created, check the configuration!')

    return input_devices


def determine_outputs(device_config: SectionProxy) -> List[OutputDevice]:
    output_devices = []
    if device_config.get('outputType') == 'fanPWM':
        output_devices.extend(LMSensorsOutput.from_path(device_config.get('outputDeviceName'), device_config.get('device'), device_config.get('outputEnabler')))
    elif device_config.get('outputType') == 'serial':
        output_devices.append(SerialOutput(device_config.getint('device')))
    else:<commit_msg>add multiple outputs to parser<commit_after>import logging
from typing import List
from configparser import SectionProxy

from .common import InputDevice, OutputDevice, lerp_range
from .temperaturecontroller import TemperatureController
from .lmsensorsdevice import LMSensorsInput, LMSensorsOutput
from .hddtemp import HDDTemp
from .serialoutput import SerialOutput

log = logging.getLogger(__name__)


def determine_inputs(device_config: SectionProxy) -> List[InputDevice]:
    input_devices = []
    if device_config.get('inputType') == 'componentTemp':
        specific_devices = [k.strip() for k in device_config.get('temperatureMonitorDeviceName').split(',')]
        for idx, path in enumerate([k.strip() for k in device_config.get('temperatureMonitor').split(',')]):
            input_devices.extend(LMSensorsInput.from_path(specific_devices[idx], path))
    elif device_config.get('inputType') == 'hddtemp':
        input_devices.append(HDDTemp())
    else:
        raise ValueError('No Input device created, check the configuration!')

    return input_devices


def determine_outputs(device_config: SectionProxy) -> List[OutputDevice]:
    output_devices = []
    if device_config.get('outputType') == 'fanPWM':
        output_device = device_config.get('outputDeviceName')
        specific_device_outputs = [k.strip() for k in device_config.get('device').split(',')]
        specific_device_output_enablers = [k.strip() for k in device_config.get('outputEnabler').split(',')]

        for idx, path in enumerate(specific_device_outputs):
            output_devices.extend(LMSensorsOutput.from_path(output_device, path, specific_device_output_enablers[idx]))

    elif device_config.get('outputType') == 'serial':
        output_devices.append(SerialOutput(device_config.getint('device')))
    else:
{'fraction_non_alphanumeric': 0.11134580567290284, 'fraction_numerical': 0.0, 'mean_word_length': 5.196261682242991, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1417391', 'n_tokens_mistral': 928, 'n_tokens_neox': 908, 'n_words': 204}