diff options
Diffstat (limited to 'src/wheel/util.py')
| -rw-r--r-- | src/wheel/util.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wheel/util.py b/src/wheel/util.py index a1f1e3b..09f5b29 100644 --- a/src/wheel/util.py +++ b/src/wheel/util.py @@ -1,7 +1,7 @@ import base64 -def native(s, encoding='utf-8'): +def native(s, encoding="utf-8"): if isinstance(s, bytes): return s.decode(encoding) else: @@ -10,23 +10,23 @@ def native(s, encoding='utf-8'): def urlsafe_b64encode(data): """urlsafe_b64encode without padding""" - return base64.urlsafe_b64encode(data).rstrip(b'=') + return base64.urlsafe_b64encode(data).rstrip(b"=") def urlsafe_b64decode(data): """urlsafe_b64decode without padding""" - pad = b'=' * (4 - (len(data) & 3)) + pad = b"=" * (4 - (len(data) & 3)) return base64.urlsafe_b64decode(data + pad) def as_unicode(s): if isinstance(s, bytes): - return s.decode('utf-8') + return s.decode("utf-8") return s def as_bytes(s): if isinstance(s, str): - return s.encode('utf-8') + return s.encode("utf-8") else: return s |
