📝 docs: minor fixes in octoprint.util

This commit is contained in:
Gina Häußge committed 2020-04-14 13:15:40 +02:00
1 parent e6b747aef5
commit 31161e7a08
1 file changed
+7 -2
+7 -2
View File
@@ -89,7 +89,10 @@ def to_unicode(s_or_u, encoding="utf-8", errors="strict"):
def to_native_str(s_or_u):
# type: (Union[unicode, bytes]) -> str
"""Make sure ``s_or_u`` is a 'str'."""
"""
Make sure ``s_or_u`` is a native 'str' for the current Python version
Will ensure a byte string under Python 2 and a unicode string under Python 3."""
if sys.version_info[0] == 2:
return to_bytes(s_or_u)
else:
@@ -280,7 +283,9 @@ Returns:
"""
to_str = deprecated("to_str has been renamed to to_bytes", since="1.3.11")(to_bytes)
to_str = deprecated("to_str has been renamed to to_bytes",
includedoc="to_str has been renamed to to_bytes",
since="1.3.11")(to_bytes)
def get_formatted_size(num):