Nope. Everything looks fine and it cannot be replaced by r"". The lookupFunction here is actually inside a large multi-line string that cannot be raw so I need to escape $ to make them actually do interpolation in the generated code. Does that make sense?