updated the update_doc module for the new example unit
Dieser Commit ist enthalten in:
Ursprung
ebfe00d1a4
Commit
2e0ae0267f
|
@ -11,7 +11,7 @@ regex = re.compile("DOCUMENTATION *= *r?(?P<quote>\"{3}|'{3})(---)?.*?(?P=quote)
|
|||
|
||||
if __name__ == "__main__":
|
||||
for modfile in moduledir.iterdir():
|
||||
if modfile.name in ( "__init__.py", "__pycache__"):
|
||||
if modfile.name in ( "__init__.py", "__pycache__", "unit.py.example"):
|
||||
continue
|
||||
mod = importlib.import_module(".".join((modfile.parts[:-1])+(modfile.stem,)))
|
||||
if hasattr(mod, "Module"):
|
||||
|
@ -36,5 +36,6 @@ if __name__ == "__main__":
|
|||
continue
|
||||
newmod = "{pre}DOCUMENTATION = {quote}{doc}{quote}{post}".format(pre=moddata[:match.start()], quote=match.group("quote"), doc=moddoc, post=moddata[match.end():])
|
||||
modfile.write_text(newmod)
|
||||
print("updated the documentation of module {}".format(module.name))
|
||||
|
||||
# code: python
|
||||
|
|
Laden…
In neuem Issue referenzieren