Skip to content

Commit 866078d

Browse files
Semihaltravispavek
authored andcommitted
Fix: Python 3.5 don't support re.match.__getitem__ (#131)
https://docs.python.org/3/library/re.html#re.match.__getitem__ It's shorthand for match.group(0) - 0 is the default if not supplied so you can omit that too.
1 parent 42aa5dc commit 866078d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

testrail/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ def __getitem__(self, index):
8080

8181
def custom_methods(content):
8282
matches = [custom_methods_re.match(method) for method in content]
83-
return dict({match[1]: match[0] for match in matches if match})
83+
return dict({match.group(1): match.group(0) for match in matches if match})
8484

0 commit comments

Comments
 (0)