mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
Fix open (#9368)
This commit is contained in:
parent
d018afced0
commit
de29ff9bd2
1 changed files with 1 additions and 1 deletions
|
|
@ -315,7 +315,7 @@ def find_all_documented_objects():
|
|||
""" Parse the content of all doc files to detect which classes and functions it documents"""
|
||||
documented_obj = []
|
||||
for doc_file in Path(PATH_TO_DOC).glob("**/*.rst"):
|
||||
with open(doc_file) as f:
|
||||
with open(doc_file, "r", encoding="utf-8", newline="\n") as f:
|
||||
content = f.read()
|
||||
raw_doc_objs = re.findall(r"(?:autoclass|autofunction):: transformers.(\S+)\s+", content)
|
||||
documented_obj += [obj.split(".")[-1] for obj in raw_doc_objs]
|
||||
|
|
|
|||
Loading…
Reference in a new issue