kopia lustrzana https://github.com/micropython/micropython-lib
cbor2: Remove u-module prefix from imports.
rodzic
40dfc5fbc5
commit
b9741f6584
|
@ -24,8 +24,8 @@ THE SOFTWARE.
|
|||
"""
|
||||
|
||||
|
||||
import uio
|
||||
import ustruct as struct
|
||||
import io
|
||||
import struct
|
||||
|
||||
|
||||
class CBORDecodeError(Exception):
|
||||
|
@ -248,7 +248,7 @@ def loads(payload, **kwargs):
|
|||
:param kwargs: keyword arguments passed to :class:`~.CBORDecoder`
|
||||
:return: the deserialized object
|
||||
"""
|
||||
fp = uio.BytesIO(payload)
|
||||
fp = io.BytesIO(payload)
|
||||
return CBORDecoder(fp, **kwargs).decode()
|
||||
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@ THE SOFTWARE.
|
|||
"""
|
||||
|
||||
|
||||
import uio
|
||||
import io
|
||||
import math
|
||||
import ustruct as struct
|
||||
import struct
|
||||
|
||||
|
||||
class CBOREncodeError(Exception):
|
||||
|
@ -169,7 +169,7 @@ def dumps(obj, **kwargs):
|
|||
:return: the serialized output
|
||||
:rtype: bytes
|
||||
"""
|
||||
fp = uio.BytesIO()
|
||||
fp = io.BytesIO()
|
||||
dump(obj, fp, **kwargs)
|
||||
return fp.getvalue()
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue