MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / find_all_documented_objects

Function find_all_documented_objects

diffusers/utils/check_repo.py:525–538  ·  view source on GitHub ↗

Parse the content of all doc files to detect which classes and functions it documents

()

Source from the content-addressed store, hash-verified

523
524
525def find_all_documented_objects():
526 """Parse the content of all doc files to detect which classes and functions it documents"""
527 documented_obj = []
528 for doc_file in Path(PATH_TO_DOC).glob("**/*.rst"):
529 with open(doc_file, "r", encoding="utf-8", newline="\n") as f:
530 content = f.read()
531 raw_doc_objs = re.findall(r"(?:autoclass|autofunction):: transformers.(\S+)\s+", content)
532 documented_obj += [obj.split(".")[-1] for obj in raw_doc_objs]
533 for doc_file in Path(PATH_TO_DOC).glob("**/*.md"):
534 with open(doc_file, "r", encoding="utf-8", newline="\n") as f:
535 content = f.read()
536 raw_doc_objs = re.findall(r"\[\[autodoc\]\]\s+(\S+)\s+", content)
537 documented_obj += [obj.split(".")[-1] for obj in raw_doc_objs]
538 return documented_obj
539
540
541# One good reason for not being documented is to be deprecated. Put in this list deprecated objects.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected