diff --git a/src/dynapyt/instrument/CodeInstrumenter.py b/src/dynapyt/instrument/CodeInstrumenter.py index f006b2d..0af077b 100644 --- a/src/dynapyt/instrument/CodeInstrumenter.py +++ b/src/dynapyt/instrument/CodeInstrumenter.py @@ -186,11 +186,13 @@ def __wrap_in_lambda(self, original_node, updated_node): def __as_string(self, s): if "\\" in s: - s = "r" + s + raw = "r" + else: + raw = "" if hasattr(self, "quote") and self.quote == '"': - return "'" + s + "'" + return raw + "'" + s + "'" else: - return '"' + s + '"' + return raw + '"' + s + '"' def visit_Annotation(self, node): return False