mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 21:10:27 -06:00
10 lines
167 B
Python
10 lines
167 B
Python
def to_text(s):
|
|
return s if isinstance(s, str) else s.decode('UTF-8')
|
|
|
|
|
|
def to_bytes(s):
|
|
return s if isinstance(s, bytes) else s.encode('UTF-8')
|
|
|
|
|
|
n = to_text
|