Skip to content

Commit f677478

Browse files
authored
Merge pull request #378 from roottool/change-from-open-to-io.open#377
Changed from open() to io.open()
2 parents e6e26c3 + fc9fb8b commit f677478

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pre_commit_hooks/check_yaml.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import argparse
44
import collections
5+
import io
56
import sys
67
from typing import Any
78
from typing import Generator
@@ -58,7 +59,7 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
5859
retval = 0
5960
for filename in args.filenames:
6061
try:
61-
with open(filename) as f:
62+
with io.open(filename, encoding='UTF-8') as f:
6263
load_fn(f)
6364
except ruamel.yaml.YAMLError as exc:
6465
print(exc)

0 commit comments

Comments
 (0)