kopia lustrzana https://github.com/micropython/micropython-lib
cbor2: Improve decoder to pass Ruff F821 undefined-name.
These were probably intentional missing names, however raising NotImplementedError or KeyError is more explicit than trying to call an unknown function. Signed-off-by: Angus Gratton <angus@redyak.com.au>pull/714/head
rodzic
786c0ea895
commit
c6a72c70b9
|
@ -160,7 +160,7 @@ def decode_simple_value(decoder):
|
||||||
|
|
||||||
def decode_float16(decoder):
|
def decode_float16(decoder):
|
||||||
payload = decoder.read(2)
|
payload = decoder.read(2)
|
||||||
return unpack_float16(payload)
|
raise NotImplementedError # no float16 unpack function
|
||||||
|
|
||||||
|
|
||||||
def decode_float32(decoder):
|
def decode_float32(decoder):
|
||||||
|
@ -185,7 +185,7 @@ special_decoders = {
|
||||||
20: lambda self: False,
|
20: lambda self: False,
|
||||||
21: lambda self: True,
|
21: lambda self: True,
|
||||||
22: lambda self: None,
|
22: lambda self: None,
|
||||||
23: lambda self: undefined,
|
# 23 is undefined
|
||||||
24: decode_simple_value,
|
24: decode_simple_value,
|
||||||
25: decode_float16,
|
25: decode_float16,
|
||||||
26: decode_float32,
|
26: decode_float32,
|
||||||
|
|
Ładowanie…
Reference in New Issue