mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Default to UTF-8 encoding in open() calls
This commit is contained in:
parent
1be4e4f82e
commit
e272c219fd
8 changed files with 26 additions and 18 deletions
|
|
@ -1,7 +1,6 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import io
|
||||
import os.path
|
||||
import shlex
|
||||
import string
|
||||
|
|
@ -41,7 +40,7 @@ def parse_filename(filename):
|
|||
if not os.path.exists(filename) or not os.access(filename, os.X_OK):
|
||||
return ()
|
||||
|
||||
with io.open(filename, 'rb') as f:
|
||||
with open(filename, 'rb') as f:
|
||||
return parse_bytesio(f)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue