Skip to content

Commit b17374a

Browse files
committed
Fix pycodestyle
1 parent 8b87e5f commit b17374a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/onelogin/saml2/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ class OneLogin_Saml2_Utils(object):
9191

9292
TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
9393
TIME_FORMAT_2 = "%Y-%m-%dT%H:%M:%S.%fZ"
94-
TIME_FORMAT_WITH_FRAGMENT = re.compile(
95-
"^(\d{4,4}-\d{2,2}-\d{2,2}T\d{2,2}:\d{2,2}:\d{2,2})(\.\d*)?Z?$")
94+
TIME_FORMAT_WITH_FRAGMENT = re.compile(r'^(\d{4,4}-\d{2,2}-\d{2,2}T\d{2,2}:\d{2,2}:\d{2,2})(\.\d*)?Z?$')
9695

9796
@staticmethod
9897
def decode_base64_and_inflate(value):
@@ -472,7 +471,7 @@ def parse_SAML_to_time(timestr):
472471
except ValueError:
473472
elem = OneLogin_Saml2_Utils.TIME_FORMAT_WITH_FRAGMENT.match(timestr)
474473
if not elem:
475-
raise Exception("time data %s does not match format %s" % (timestr, "yyyy-mm-ddThh:mm:ss(\.s+)?Z"))
474+
raise Exception("time data %s does not match format %s" % (timestr, r'yyyy-mm-ddThh:mm:ss(\.s+)?Z'))
476475
data = datetime.strptime(elem.groups()[0] + "Z", OneLogin_Saml2_Utils.TIME_FORMAT)
477476

478477
return calendar.timegm(data.utctimetuple())

0 commit comments

Comments
 (0)