remove error on codefactor

This commit is contained in:
Atsushi Sakai
2019-02-01 20:57:52 +09:00
parent 0694eb237e
commit d6fb8d6f82
7 changed files with 153 additions and 432 deletions

View File

@@ -1,3 +1,7 @@
import subprocess
import os.path
import os
import glob
"""
Jupyter notebook converter to rst file
@@ -8,11 +12,6 @@ author: Atsushi Sakai
NOTEBOOK_DIR = "../"
import glob
import os
import os.path
import subprocess
def get_notebook_path_list(ndir):
path = glob.glob(ndir + "**/*.ipynb", recursive=True)
@@ -29,8 +28,8 @@ def convert_rst(rstpath):
after = ".. code-block:: ipython3"
filedata = filedata.replace(before, after)
with open(rstpath, "w") as file:
file.write(filedata)
with open(rstpath, "w") as ffile:
ffile.write(filedata)
def generate_rst(npath):