Skip to content

Commit 2992923

Browse files
committed
Addressed comment so we use space instead of comma in enumeration argument.
1 parent d3cff26 commit 2992923

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

smartdispatch/argument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self):
1616
self.regex = "\[[^]]*\]"
1717

1818
def unfold(self, match):
19-
return match[1:-1].split(',')
19+
return match[1:-1].split(' ')
2020

2121

2222
class RangeArgument(object):

smartdispatch/smartdispatch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ def unfold_arguments(arguments):
132132
133133
Complex arguments
134134
-----------------
135-
*enumeration*: "[item1,item2,...,itemN]"
135+
*enumeration*: "[item1 item2 ... itemN]"
136136
*range*: "[start:end]" or "[start:end:step]"
137137
'''
138138
text = utils.escape(" ".join(arguments))
139139

140140
# Order matter, if some regex is more greedy than another, the it should go after
141-
arguments = [EnumerationArgument(), RangeArgument()]
141+
arguments = [RangeArgument(), EnumerationArgument()]
142142

143143
# Build the master regex with all argument's regex
144144
regex = "(" + "|".join(["(?P<{0}>{1})".format(arg.name, arg.regex) for arg in arguments]) + ")"

0 commit comments

Comments
 (0)