Skip to content

Commit

Permalink
Use raw strings where uninterpreted escaped characters are used
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Roskin committed Mar 27, 2015
1 parent 93abbca commit abba2b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frescobaldi_app/objecteditor/defineoffset.py
Expand Up @@ -95,5 +95,5 @@ def createOffsetOverride(self, x, y):
if len(objToOverride) > 0:
objToOverride += "."
objToOverride += self.lilyObject
return ("\once \override {0}.extra-offset = #'({1:.2f} . {2:.2f})"
return (r"\once \override {0}.extra-offset = #'({1:.2f} . {2:.2f})"
.format(objToOverride, x, y))
4 changes: 2 additions & 2 deletions frescobaldi_app/snippet/highlight.py
Expand Up @@ -239,8 +239,8 @@ class PySpecialVariable(Variable):

class PyValue(Value):
rx = (
"(0[bB][01]+|0[oO][0-7]+|0[xX][0-9A-Fa-f]+|\d+)[lL]?"
"|(\d+\.\d*|\.\d+)([eE][+-]?\d+)?"
r"(0[bB][01]+|0[oO][0-7]+|0[xX][0-9A-Fa-f]+|\d+)[lL]?"
r"|(\d+\.\d*|\.\d+)([eE][+-]?\d+)?"
)

# Parsers, many because of complicated string quote types in Python
Expand Down

0 comments on commit abba2b7

Please sign in to comment.