INNER CODE UNIT · Python

indent

Kotlin/kandy · util/kandy-samples-utils/nb_to_doc.py:415

                indent = len(lines[0]) - len(lines[0].lstrip())
                lines[0] = ' ' * indent + 'private ' + lines[0].lstrip()
            final_declarations.append('\n'.join(lines))

    return final_declarations


def create_kt_file(kt_filename: str, cells: List[Tuple[NotebookNode, Optional[str], Optional[str]]], base_name: str) -> None:
    """
    Creates a Kotlin test file preserving order of code cells.

    Args:
        kt_filename: Path to the output Kotlin file
        cells: List of tuples containing (cell, output_type, output_content)
        base_name: Base name for function names and class names
    """
    try:
        # Collect all definitions and imports

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…