@classmethod
    def from_excellon(cls, line, **kwargs):
        line = line[1:]
        compensation_index = None

        # up to 3 characters for tool number (Frizting uses that)
        if len(line) <= 3:
            tool = int(line)
        else:
            tool = int(line[:2])
            compensation_index = int(line[2:])

        return cls(tool, compensation_index, **kwargs)
Create a ToolSelectionStmt from an excellon file line.
dataset/ETHPy150Open curtacircuitos/pcb-tools/gerber/excellon_statements.py/ToolSelectionStmt.from_excellon