fix new flake8 error for poor variable name

This commit is contained in:
Sean Brogan 2020-08-13 10:53:51 -07:00 коммит произвёл Sean Brogan
Родитель 036bf73791
Коммит 479c0ca74d
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -433,21 +433,21 @@ class DocBuild(object):
return 0
def MakeYml(self):
f = open(self.YmlFilePathBase, "r")
f2 = open(self.YmlFilePathOut, 'w')
for l in f:
f2.write(l)
ymlbase = open(self.YmlFilePathBase, "r")
yamlout = open(self.YmlFilePathOut, 'w')
for line in ymlbase:
yamlout.write(line)
# now parse as yaml
f.seek(0)
ymlbase.seek(0)
# yaml.load(f)
# IMPORTANT NOTE: This call to "unsafe_load()" is only acceptable because we control the yml file being loaded.
# Unsafe load is required to support some configuration options for pymdownx.
if "extra" in yaml.unsafe_load(f):
if "extra" in yaml.unsafe_load(ymlbase):
raise Exception(
"extra: member not allowed in mkdocs_base.yml. Please add the contents to DocBuild constructor instead. ")
f.close()
self.Yml = f2
ymlbase.close()
self.Yml = yamlout
def CloseYml(self):
if self.Yml is not None: