mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 10:16:52 +00:00
Changed from open() to io.open()
This commit is contained in:
parent
e6e26c3110
commit
e7924b53e4
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ from __future__ import print_function
|
|||
import argparse
|
||||
import collections
|
||||
import sys
|
||||
import io
|
||||
from typing import Any
|
||||
from typing import Generator
|
||||
from typing import Optional
|
||||
|
|
@ -58,7 +59,7 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
|
|||
retval = 0
|
||||
for filename in args.filenames:
|
||||
try:
|
||||
with open(filename) as f:
|
||||
with io.open(filename, encoding='UTF-8') as f:
|
||||
load_fn(f)
|
||||
except ruamel.yaml.YAMLError as exc:
|
||||
print(exc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue