mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Tests pass on windows
This commit is contained in:
parent
56e5c4eb2d
commit
143ed94500
21 changed files with 224 additions and 109 deletions
|
|
@ -6,5 +6,17 @@ PY3 = str is not bytes
|
|||
|
||||
if PY2: # pragma: no cover (PY2 only)
|
||||
text = unicode # flake8: noqa
|
||||
|
||||
def n(s):
|
||||
if isinstance(s, bytes):
|
||||
return s
|
||||
else:
|
||||
return s.encode('UTF-8')
|
||||
else: # pragma: no cover (PY3 only)
|
||||
text = str
|
||||
|
||||
def n(s):
|
||||
if isinstance(s, text):
|
||||
return s
|
||||
else:
|
||||
return s.decode('UTF-8')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue