aboutsummaryrefslogtreecommitdiff
path: root/Lib/fontTools/misc/sstruct.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/fontTools/misc/sstruct.py')
-rw-r--r--Lib/fontTools/misc/sstruct.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/fontTools/misc/sstruct.py b/Lib/fontTools/misc/sstruct.py
index 528b5e02..6b7e783e 100644
--- a/Lib/fontTools/misc/sstruct.py
+++ b/Lib/fontTools/misc/sstruct.py
@@ -110,20 +110,20 @@ def calcsize(fmt):
# matches "name:formatchar" (whitespace is allowed)
_elementRE = re.compile(
- "\s*" # whitespace
- "([A-Za-z_][A-Za-z_0-9]*)" # name (python identifier)
- "\s*:\s*" # whitespace : whitespace
- "([cbBhHiIlLqQfd]|[0-9]+[ps]|" # formatchar...
- "([0-9]+)\.([0-9]+)(F))" # ...formatchar
- "\s*" # whitespace
- "(#.*)?$" # [comment] + end of string
+ r"\s*" # whitespace
+ r"([A-Za-z_][A-Za-z_0-9]*)" # name (python identifier)
+ r"\s*:\s*" # whitespace : whitespace
+ r"([cbBhHiIlLqQfd]|[0-9]+[ps]|" # formatchar...
+ r"([0-9]+)\.([0-9]+)(F))" # ...formatchar
+ r"\s*" # whitespace
+ r"(#.*)?$" # [comment] + end of string
)
# matches the special struct fmt chars and 'x' (pad byte)
-_extraRE = re.compile("\s*([x@=<>!])\s*(#.*)?$")
+_extraRE = re.compile(r"\s*([x@=<>!])\s*(#.*)?$")
# matches an "empty" string, possibly containing whitespace and/or a comment
-_emptyRE = re.compile("\s*(#.*)?$")
+_emptyRE = re.compile(r"\s*(#.*)?$")
_fixedpointmappings = {
8: "b",