black ".\research\evaluation_detection.ipynb"
输出
error: cannot format research\evaluation_detection.ipynb: unindent does not match any outer indentation level (<tokenize>, line 11)
Oh no! 💥 💔 💥
1 file failed to reformat.
问题是我的文件有很多第 11 行的单元格;文件开头只有一层。 使用什么工具/脚本来解决此代码风格异常破坏能力提交。
jupyter nbconvert --to script ".\research\evaluation_detection.ipynb"
提供更详细的错误日志,其中包含行
raise IndentationError(
File "<tokenize>", line 11
n_face = len(face_obj)
IndentationError: unindent does not match any outer indentation level
通过这一行我们可以编辑原始的 ipynb