torproject / stem

Python controller library for Tor
https://stem.torproject.org/
GNU Lesser General Public License v3.0
257 stars 75 forks source link

Use enum for `flags` field in `RouterStatusEntry` #83

Closed jbrown299 closed 3 years ago

jbrown299 commented 3 years ago

For now it's list of strings:

flags = ['Fast', 'Guard', 'HSDir', 'Running', 'Stable', 'V2Dir', 'Valid']

Better to use enum.

atagar commented 3 years ago

Hi James. RouterStatusEntry already uses our Flag enum.

https://stem.torproject.org/api/descriptor/router_status_entry.html#stem.descriptor.router_status_entry.RouterStatusEntry https://stem.torproject.org/api/control.html#stem.Flag