mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 03:26:53 +00:00
Open files as UTF-8
This commit is contained in:
parent
16ff195820
commit
54c0f8c937
6 changed files with 10 additions and 8 deletions
|
|
@ -58,7 +58,7 @@ def main(argv=None):
|
|||
retv = 0
|
||||
|
||||
for filename in args.filenames:
|
||||
contents = io.open(filename).read()
|
||||
contents = io.open(filename, encoding='UTF-8').read()
|
||||
retv |= check_docstring_first(contents, filename=filename)
|
||||
|
||||
return retv
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue