mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-23 19:19:31 +01:00
reverse_modes: return a list and not a set of modes
This ensures that order is kept when the input is a list.
This commit is contained in:
parent
808e1d1f5a
commit
32219ccb78
@ -1140,8 +1140,8 @@ class PyLinkNetworkCoreWithUtils(PyLinkNetworkCore):
|
||||
"+mi-lk test => "-mi+lk test"
|
||||
"mi-k test => "-mi+k test"
|
||||
[('+m', None), ('+r', None), ('+l', '3'), ('-o', 'person')
|
||||
=> {('-m', None), ('-r', None), ('-l', None), ('+o', 'person')})
|
||||
{('s', None), ('+o', 'whoever') => {('-s', None), ('-o', 'whoever')})
|
||||
=> [('-m', None), ('-r', None), ('-l', None), ('+o', 'person')}]
|
||||
{('s', None), ('+o', 'whoever') => [('-s', None), ('-o', 'whoever')}]
|
||||
"""
|
||||
origstring = isinstance(modes, str)
|
||||
|
||||
@ -1206,7 +1206,7 @@ class PyLinkNetworkCoreWithUtils(PyLinkNetworkCore):
|
||||
# If the original query is a string, send it back as a string.
|
||||
return self.join_modes(newmodes)
|
||||
else:
|
||||
return set(newmodes)
|
||||
return newmodes
|
||||
|
||||
@staticmethod
|
||||
def join_modes(modes, sort=False):
|
||||
|
Loading…
Reference in New Issue
Block a user