Skip to content

Commit e7924b5

Browse files
committed
Changed from open() to io.open()
1 parent e6e26c3 commit e7924b5

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
@@ -3,6 +3,7 @@
33
import argparse
44
import collections
55
import sys
6+
import io
67
from typing import Any
78
from typing import Generator
89
from typing import Optional
@@ -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)