tests: net: lib: lwm2m: interop: Fix strip-with-multi-characters (B005)
All strip functions remove any of the provided characters instead of a prefix/suffix. This is likely a bug. See https://docs.astral.sh/ruff/rules/strip-with-multi-characters/ Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
8f14c68660
commit
175bfb4bc9
1 changed files with 1 additions and 1 deletions
|
@ -455,7 +455,7 @@ class LeshanEventsIterator:
|
|||
for line in self._it:
|
||||
if not line.startswith('data: '):
|
||||
continue
|
||||
data = json.loads(line.lstrip('data: '))
|
||||
data = json.loads(line.removeprefix('data: '))
|
||||
if event == 'SEND' or (event == 'NOTIFICATION' and data['kind'] == 'composite'):
|
||||
return Leshan.parse_composite(data['val'])
|
||||
if event == 'NOTIFICATION':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue