<commit_before>from qcodes.instrument_drivers.agilent import E8527D as E8527D
from typing import Any


class Agilent_E8527D(E8527D.Agilent_E8527D):
    """
    Modified version of the QCoDeS Agilent_E8527D driver with higher maximal
    power and with parameter pulsemod_state for using Pulse Modulation.
    """
    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        # Allow powers up to 25 dBm
        self._max_power = 25
        self.power.vals.valid_values = (self._min_power, self._max_power)
        # Add parameter pulsemod_state
        self.add_parameter(<commit_msg>bugfix Agilent_E8527D: correctly overwrite the power validator<commit_after>from qcodes.instrument_drivers.agilent import E8527D as E8527D
from typing import Any
from qcodes.utils import validators as vals


class Agilent_E8527D(E8527D.Agilent_E8527D):
    """
    Modified version of the QCoDeS Agilent_E8527D driver with higher maximal
    power and with parameter pulsemod_state for using Pulse Modulation.
    """
    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        # Allow powers up to 25 dBm
        self._max_power = 25
        self.power.vals = vals.Numbers(self._min_power, self._max_power)
        # Add parameter pulsemod_state
        self.add_parameter(
{'fraction_non_alphanumeric': 0.07828655834564253, 'fraction_numerical': 0.04431314623338257, 'mean_word_length': 3.486754966887417, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1083990', 'n_tokens_mistral': 477, 'n_tokens_neox': 422, 'n_words': 121}