From 32219ccb78256c09e328dcd5f1a26a5fbc85bfe2 Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 26 Aug 2019 13:16:52 -0700 Subject: [PATCH] reverse_modes: return a list and not a set of modes This ensures that order is kept when the input is a list. --- classes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes.py b/classes.py index 7dea015..c5b1abe 100644 --- a/classes.py +++ b/classes.py @@ -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):