Reformat using black
This commit is contained in:
parent
efee4ad081
commit
a87fb49918
221 changed files with 19127 additions and 7310 deletions
|
@ -6,12 +6,12 @@ def utf8bytes(maybe_text):
|
|||
return
|
||||
if isinstance(maybe_text, six.binary_type):
|
||||
return maybe_text
|
||||
return maybe_text.encode('utf-8')
|
||||
return maybe_text.encode("utf-8")
|
||||
|
||||
|
||||
def utf8text(maybe_bytes, errors='strict'):
|
||||
def utf8text(maybe_bytes, errors="strict"):
|
||||
if maybe_bytes is None:
|
||||
return
|
||||
if isinstance(maybe_bytes, six.text_type):
|
||||
return maybe_bytes
|
||||
return maybe_bytes.decode('utf-8', errors)
|
||||
return maybe_bytes.decode("utf-8", errors)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue