Skip to content

Commit 72dba99

Browse files
committed
[OMCPathReal] fix flake8
OMPython/OMCSession.py:339:110: E999 SyntaxError: f-string: unmatched '('
1 parent 82559d6 commit 72dba99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

OMPython/OMCSession.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ def write_text(self, data: str, encoding=None, errors=None, newline=None):
333333
if not isinstance(data, str):
334334
raise TypeError(f"data must be str, not {data.__class__.__name__}")
335335

336-
self._session.sendExpression(f'writeFile("{self.as_posix()}", "{data.replace('"', '\\"')}", false);')
336+
data_omc = data.replace('"', '\\"')
337+
self._session.sendExpression(f'writeFile("{self.as_posix()}", "{data_omc}", false);')
337338

338339
return len(data)
339340

0 commit comments

Comments
 (0)