mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
some manual py2 cleanups
This commit is contained in:
parent
30c1e8289f
commit
ab19b94811
23 changed files with 31 additions and 59 deletions
|
|
@ -1,6 +1,3 @@
|
|||
import six
|
||||
|
||||
|
||||
def to_text(s):
|
||||
return s if isinstance(s, str) else s.decode('UTF-8')
|
||||
|
||||
|
|
@ -9,4 +6,4 @@ def to_bytes(s):
|
|||
return s if isinstance(s, bytes) else s.encode('UTF-8')
|
||||
|
||||
|
||||
n = to_bytes if six.PY2 else to_text
|
||||
n = to_text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue