map_notebook_error
- map_notebook_error(violation: Violation, format_str: str) tuple[str, int] | None [source]
Map the violation caused in an intermediate file back to its cause.
The cause is resolved as the notebook, the input cell and the respective line number in that cell.
- Parameters:
violation (Violation) – Reported violation from checking the parsed notebook
format_str (str) – Format string used to format the notebook path and cell reporting.
- Returns:
(filename, input_cell_line_number)
filename
being the name of the original notebook and the input cell were the violation was reported.input_cell_line_number
line number in the input cell were the violation was reported.- Return type:
tuple[str, int] | None