Skip to content

Commit 941f70c

Browse files
ruff formatting
1 parent 3c5d9a9 commit 941f70c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

snap7/util/setters.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,10 @@ def set_string(bytearray_: bytearray, byte_index: int, value: str, max_size: int
228228
raise ValueError(f"max_size: {max_size} > max. allowed 254 chars")
229229

230230
if any(ord(char) < 0 or ord(char) > 255 for char in value):
231-
raise ValueError("Value contains ascii values > 255, which is not compatible with PLC Type STRING."
232-
"Check encoding of value or try set_wstring().")
231+
raise ValueError(
232+
"Value contains ascii values > 255, which is not compatible with PLC Type STRING."
233+
"Check encoding of value or try set_wstring()."
234+
)
233235

234236
size = len(value)
235237
# FAIL HARD WHEN trying to write too much data into PLC

0 commit comments

Comments
 (0)