INNER CODE UNIT · Python

split_row

YutaSugimura/DeFi-Map · scripts/check_format.py:45

def split_row(line: str) -> list[str] | None:
    if not (line.startswith("| ") and line.endswith(" |")):
        return None
    return line[2:-2].split(" | ")


def check_chain_file(path: Path) -> int:
    lines = path.read_text(encoding="utf-8").splitlines()
    if not lines or not lines[0].startswith("# DeFi on "):
        err(f"{path}: first line must be a '# DeFi on ...' title")

    section_indices: list[int] = []
    rows = 0
    current = None
    for n, line in enumerate(lines, 1):
        if line.startswith("## "):
            current = line[3:].strip()
            if current not in CANONICAL_ORDER:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…