explicitly set utf8 for Windows (#17664)

This commit is contained in:
Bram Vanroy
2022-06-13 14:05:45 +02:00
committed by GitHub
parent c1daf724ea
commit 73083581a4
3 changed files with 4 additions and 4 deletions

View File

@@ -725,7 +725,7 @@ def check_docstrings_are_in_md():
"""Check all docstrings are in md"""
files_with_rst = []
for file in Path(PATH_TO_TRANSFORMERS).glob("**/*.py"):
with open(file, "r") as f:
with open(file, encoding="utf-8") as f:
code = f.read()
docstrings = code.split('"""')