Philipp Hörist pushed to branch master at gajim / python-nbxmpp

Commits:

1 changed file:

Changes:

  • nbxmpp/structs.py
    ... ... @@ -15,7 +15,7 @@
    15 15
     # You should have received a copy of the GNU General Public License
    
    16 16
     # along with this program; If not, see <http://www.gnu.org/licenses/>.
    
    17 17
     
    
    18
    -from typing import List
    
    18
    +from typing import Set
    
    19 19
     
    
    20 20
     import time
    
    21 21
     import random
    
    ... ... @@ -143,7 +143,7 @@ class RosterItem:
    143 143
         name: str = None
    
    144 144
         ask: str = None
    
    145 145
         subscription: str = None
    
    146
    -    groups: List[str] = field(default_factory=list)
    
    146
    +    groups: Set[str] = field(default_factory=set)
    
    147 147
     
    
    148 148
         @classmethod
    
    149 149
         def from_node(cls, node):
    
    ... ... @@ -156,7 +156,7 @@ class RosterItem:
    156 156
             attrs['jid'] = jid
    
    157 157
     
    
    158 158
             groups = {group.getData() for group in node.getTags('group')}
    
    159
    -        attrs['groups'] = list(groups)
    
    159
    +        attrs['groups'] = set(groups)
    
    160 160
     
    
    161 161
             return cls(**attrs)
    
    162 162