mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-24 17:59:23 -06:00
some manual py2 cleanups
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user