Skip to content

Commit 295a9e3

Browse files
iabdalkaderdpgeorge
authored andcommitted
senml: Remove u-module prefix from imports.
Signed-off-by: Damien George <damien@micropython.org>
1 parent b9741f6 commit 295a9e3

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

micropython/senml/examples/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
from senml import *
28-
import utime as time
28+
import time
2929

3030

3131
pack = SenmlPack("device_name")

micropython/senml/examples/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
from senml import *
28-
import utime as time
28+
import time
2929

3030

3131
pack = SenmlPack("device")

micropython/senml/examples/basic2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
from senml import *
28-
import utime as time
28+
import time
2929

3030

3131
pack = SenmlPack("device_name")

micropython/senml/examples/basic_cbor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
from senml import *
28-
import utime as time
28+
import time
2929
from cbor2 import decoder
3030

3131
pack = SenmlPack("device_name")

micropython/senml/examples/custom_record.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
from senml import *
2828

29-
import utime as time
29+
import time
3030

3131

3232
class Coordinates(SenmlRecord):

micropython/senml/examples/gateway.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
from senml import *
28-
import utime as time
28+
import time
2929

3030
gateway_pack = SenmlPack("gateway")
3131

micropython/senml/examples/supported_data_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
from senml import *
28-
import utime as time
28+
import time
2929

3030
pack = SenmlPack("device_name")
3131

micropython/senml/senml/senml_pack.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
from senml.senml_record import SenmlRecord
2828
from senml.senml_base import SenmlBase
29-
import ujson
29+
import json
3030
from cbor2 import encoder
3131
from cbor2 import decoder
3232

@@ -166,7 +166,7 @@ def from_json(self, data):
166166
:param data: a string containing json data.
167167
:return: None, will r
168168
"""
169-
records = ujson.loads(data) # load the raw senml data
169+
records = json.loads(data) # load the raw senml data
170170
self._process_incomming_data(records, SenmlPack.json_mappings)
171171

172172
def _process_incomming_data(self, records, naming_map):
@@ -242,7 +242,7 @@ def to_json(self):
242242
"""
243243
converted = []
244244
self._build_rec_dict(SenmlPack.json_mappings, converted)
245-
return ujson.dumps(converted)
245+
return json.dumps(converted)
246246

247247
def _build_rec_dict(self, naming_map, appendTo):
248248
"""

micropython/senml/senml/senml_record.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"""
2525

2626

27-
import ubinascii
27+
import binascii
2828
from senml.senml_base import SenmlBase
2929

3030

@@ -229,7 +229,7 @@ def _from_raw(self, raw, naming_map):
229229
elif naming_map["vb"] in raw:
230230
val = raw[naming_map["vb"]]
231231
elif naming_map["vd"] in raw:
232-
val = ubinascii.a2b_base64(raw[naming_map["vb"]])
232+
val = binascii.a2b_base64(raw[naming_map["vb"]])
233233
else:
234234
val = None
235235
self.value = val

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy