qcodes/instrument_drivers/Keysight/keysight_34980a.py
def post_execution_status_poll(func: Callable[..., T]) -> Callable[..., T]:
    """
    Generates a decorator that clears the instrument's status registers
    before executing the actual call and reads the status register after the
    function call to determine whether an error occurs.

    Args:
        func: function to wrap
    """
    @wraps(func)
    def wrapper(self: "Keysight34980A", *args: Any, **kwargs: Any) -> T:
        self.clear_status()
        retval = func(self, *args, **kwargs)

        stb = self.get_status()
        if stb:
            warnings.warn(f"Instrument status byte indicates an error occurred "
                          f"(value of STB was: {stb})! Use `get_error` method "
                          f"to poll error message.",
                          stacklevel=2)
        return retval

    return wrapper

    Generates a decorator that clears the instrument's status registers
    before executing the actual call and reads the status register after the
    function call to determine whether an error occurs.

    Args:
        func: function to wrap
    
Generates a decorator that clears the instrument's status registers
before executing the actual call and reads the status register after the
function call to determine whether an error occurs.
Generates a decorator that clears the instrument ' s status registers before executing the actual call and reads the status register after the function call to determine whether an error occurs .
def post_execution_status_poll(func: Callable[..., T]) -> Callable[..., T]:
    @wraps(func)
    def wrapper(self: "Keysight34980A", *args: Any, **kwargs: Any) -> T:
        self.clear_status()
        retval = func(self, *args, **kwargs)
        stb = self.get_status()
        if stb:
            warnings.warn(f"Instrument status byte indicates an error occurred "
                          f"(value of STB was: {stb})! Use `get_error` method "
                          f"to poll error message.",
                          stacklevel=2)
        return retval
    return wrapper
def post_execution_status_poll ( func : Callable [ ... , T ] ) -> Callable [ ... , T ] : @ wraps ( func ) def wrapper ( self : "Keysight34980A" , * args : Any , ** kwargs : Any ) -> T : self . clear_status ( ) retval = func ( self , * args , ** kwargs ) stb = self . get_status ( ) if stb : warnings . warn ( f"Instrument status byte indicates an error occurred " f"(value of STB was: {stb})! Use `get_error` method " f"to poll error message." , stacklevel = 2 ) return retval return wrapper
Generates a decorator that clears the instrument's status registers
before executing the actual call and reads the status register after the
function call to determine whether an error occurs.
Generates a decorator that clears the instrument ' s status registers before executing the actual call and reads the status register after the function call to determine whether an error occurs .
"""
    Generates a decorator that clears the instrument's status registers
    before executing the actual call and reads the status register after the
    function call to determine whether an error occurs.

    Args:
        func: function to wrap
    """
func
Callable[..., T]
function to wrap
function to wrap