Fix H233 in sphinx config
This is being flagged in local flake8 runs. Change-Id: I99f05996711b3851811940ad5741e96d5ae61ed6
This commit is contained in:
parent
4be2474875
commit
8282ab4ddb
@ -43,7 +43,7 @@ def write_autodoc_index():
|
|||||||
"""Return a list of modules in the SOURCE directory."""
|
"""Return a list of modules in the SOURCE directory."""
|
||||||
modlist = []
|
modlist = []
|
||||||
os.chdir(os.path.join(sourcedir, module_name))
|
os.chdir(os.path.join(sourcedir, module_name))
|
||||||
print "SEARCHING %s" % sourcedir
|
print("SEARCHING %s" % sourcedir)
|
||||||
for root, dirs, files in os.walk("."):
|
for root, dirs, files in os.walk("."):
|
||||||
for filename in files:
|
for filename in files:
|
||||||
if filename.endswith(".py"):
|
if filename.endswith(".py"):
|
||||||
@ -56,7 +56,7 @@ def write_autodoc_index():
|
|||||||
if not (base == "__init__"):
|
if not (base == "__init__"):
|
||||||
elements.append(base)
|
elements.append(base)
|
||||||
result = ".".join(elements)
|
result = ".".join(elements)
|
||||||
#print result
|
#print(result)
|
||||||
modlist.append(result)
|
modlist.append(result)
|
||||||
return modlist
|
return modlist
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ def write_autodoc_index():
|
|||||||
if any([module.startswith(exclude)
|
if any([module.startswith(exclude)
|
||||||
for exclude
|
for exclude
|
||||||
in EXCLUDED_MODULES]):
|
in EXCLUDED_MODULES]):
|
||||||
print "Excluded module %s." % module
|
print("Excluded module %s." % module)
|
||||||
continue
|
continue
|
||||||
mod_path = os.path.join(path, *module.split("."))
|
mod_path = os.path.join(path, *module.split("."))
|
||||||
generated_file = os.path.join(MOD_DIR, "%s.rst" % module)
|
generated_file = os.path.join(MOD_DIR, "%s.rst" % module)
|
||||||
@ -122,8 +122,8 @@ def write_autodoc_index():
|
|||||||
if not os.access(generated_file, os.F_OK) or \
|
if not os.access(generated_file, os.F_OK) or \
|
||||||
os.stat(generated_file).st_mtime < \
|
os.stat(generated_file).st_mtime < \
|
||||||
os.stat(source_file).st_mtime:
|
os.stat(source_file).st_mtime:
|
||||||
print "Module %s updated, generating new documentation." \
|
print("Module %s updated, generating new documentation."
|
||||||
% module
|
% module)
|
||||||
FILEOUT = open(generated_file, "w")
|
FILEOUT = open(generated_file, "w")
|
||||||
header = "The :mod:`%s` Module" % module
|
header = "The :mod:`%s` Module" % module
|
||||||
FILEOUT.write("%s\n" % ("=" * len(header),))
|
FILEOUT.write("%s\n" % ("=" * len(header),))
|
||||||
@ -142,7 +142,7 @@ def write_autodoc_index():
|
|||||||
for directory, subdirs, files in list(os.walk(RSTDIR)):
|
for directory, subdirs, files in list(os.walk(RSTDIR)):
|
||||||
for old_file in files:
|
for old_file in files:
|
||||||
if old_file not in CURRENT_SOURCES.get(directory, []):
|
if old_file not in CURRENT_SOURCES.get(directory, []):
|
||||||
print "Removing outdated file for %s" % old_file
|
print("Removing outdated file for %s" % old_file)
|
||||||
os.remove(os.path.join(directory, old_file))
|
os.remove(os.path.join(directory, old_file))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user