couple enums
What has changed
- as mentioned in https://github.com/tylerebowers/Schwabdev/pull/43 I've pulled out some examples of what I think could be nice enum additions. I think enums like this are nice for various reasons, including code completion, type safety, self-documentation. Care was also taken to make it backwards compatible. I think long term making some of the order types more error proof with this type of structure could be interesting. However, I'm trying to gauge interest first.
- Imports are reordered to classic format of default python libraries (alphabetically) followed by additional libraries (alphabetically).
- I fix a few type checker issues (mostly for optionals)
- I add a validate function which I think makes Token's init function a bit more readable
All changes look good except I do not want to use DaysOfWeek enums since it is not as broad as TimeFormat and in this case adds a small level of ambiguity. In the streamer.start_auto function all that is done is to convert to enums and then convert back out during comparison. The ints that can be used are in the docstring as well as the documentation and most people won't be changing these anyways.
I will merge if:
- DaysOfWeek enum is removed (Change:
enums.py,stream.py -> Stream.start_auto) - Raise valueError in
client.py -> Client._time_convertfor thecase _:.
@elidonner Any updates?
@elidonner Any updates?
will come back to this sometime this week
comments addressed
I will take a look at this in 1 week (very busy for this week). Just notifying so you know that this PR isn't dead.