diff --git a/update_doc b/update_doc index 5178493..3e36c26 100755 --- a/update_doc +++ b/update_doc @@ -11,7 +11,7 @@ regex = re.compile("DOCUMENTATION *= *r?(?P\"{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