sonar/core/backends/include.py
def replace_block(target_string, command, interface, indent, key=None):
    """
    For multi-line code blocks, replace the $$X variables in it while respecting
    indentation

    Args:
        target_string (str): The preceding string to append this block onto
        command (str): The block in which to replace things
        interface (???): An interface
        indent (str): String to add as leading indent for each line
        key (str or int, optional): If the replacement string is a data
            structure, use this key to index it. Defaults to None.

    Returns:
        str: The updated target_string
    """
    # command = command.replace("$$name", interface.name)
    command = replace_variables(command, interface, key)
    command = command.replace("\n", "\n" + indent)
    target_string += indent + command + "\n"
    return target_string

    For multi-line code blocks, replace the $$X variables in it while respecting
    indentation

    Args:
        target_string (str): The preceding string to append this block onto
        command (str): The block in which to replace things
        interface (???): An interface
        indent (str): String to add as leading indent for each line
        key (str or int, optional): If the replacement string is a data
            structure, use this key to index it. Defaults to None.

    Returns:
        str: The updated target_string
    
For multi-line code blocks, replace the $$X variables in it while respecting
indentation
For multi - line code blocks replace the $$X variables in it while respecting indentation
def replace_block(target_string, command, interface, indent, key=None):
    command = replace_variables(command, interface, key)
    command = command.replace("\n", "\n" + indent)
    target_string += indent + command + "\n"
    return target_string
def replace_block ( target_string , command , interface , indent , key = None ) : command = replace_variables ( command , interface , key ) command = command . replace ( "\n" , "\n" + indent ) target_string += indent + command + "\n" return target_string
For multi-line code blocks, replace the $$X variables in it while respecting
indentation
For multi - line code blocks replace the $$X variables in it while respecting indentation
"""
    For multi-line code blocks, replace the $$X variables in it while respecting
    indentation

    Args:
        target_string (str): The preceding string to append this block onto
        command (str): The block in which to replace things
        interface (???): An interface
        indent (str): String to add as leading indent for each line
        key (str or int, optional): If the replacement string is a data
            structure, use this key to index it. Defaults to None.

    Returns:
        str: The updated target_string
    """ # command = command.replace("$$name", interface.name)
The updated target_string
The updated target_string
str
target_string
The preceding string to append this block onto
The preceding string to append this block onto
command
The block in which to replace things
The block in which to replace things
interface
None
indent
String to add as leading indent for each line
String to add as leading indent for each line
key
If the replacement string is a data
structure, use this key to index it. Defaults to None.
If the replacement string is a data structure use this key to index it . Defaults to None .