mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-22 08:23:09 +00:00
Make json conversion functions private
This commit is contained in:
@@ -479,17 +479,17 @@ def _bytes_to_base64_data(data: bytes) -> str:
|
||||
|
||||
if HAS_ORJSON:
|
||||
|
||||
def to_json(obj: Any) -> str: # type: ignore
|
||||
def _to_json(obj: Any) -> str: # type: ignore
|
||||
return orjson.dumps(obj).decode('utf-8')
|
||||
|
||||
from_json = orjson.loads # type: ignore
|
||||
_from_json = orjson.loads # type: ignore
|
||||
|
||||
else:
|
||||
|
||||
def to_json(obj: Any) -> str:
|
||||
def _to_json(obj: Any) -> str:
|
||||
return json.dumps(obj, separators=(',', ':'), ensure_ascii=True)
|
||||
|
||||
from_json = json.loads
|
||||
_from_json = json.loads
|
||||
|
||||
|
||||
def _parse_ratelimit_header(request: Any, *, use_clock: bool = False) -> float:
|
||||
|
Reference in New Issue
Block a user