This fixes the Windows implementation of enumerating a list of users.
Also, added extra type checks for edge cases to prevent confusing errors, and will now raise a ModuleFailed error incase users variable is not a dict or list of users.
Major Changes Implemented:
Commented the hard coded users = users[0] as it caused a type error and it would only allow the very first user in list to display when using the sessions command. This is commented because a future feature can allow picking which user in list to grab info from, instead of all the sessions.
Added some basic type checks to make code more robust to possible edge cases. A dict will now be treated like a dict, and a list will always be enumerated. If users variable is neither a dict or list, then it will raise a ModuleFailed error.
Pre-Merge Tasks
[ + ] Formatted all modified files w/ python-black
[ + ] Sorted imports for modified files w/ isort
[ + ] Ran flake8 on repo, and fixed any new problems w/ modified files
[ + ] Ran pytest test cases
[ + ] Added brief summary of updates to CHANGELOG (under [Unreleased])
Description of Changes
This fixes the Windows implementation of enumerating a list of users. Also, added extra type checks for edge cases to prevent confusing errors, and will now raise a ModuleFailed error incase users variable is not a dict or list of users.
Major Changes Implemented:
users = users[0]
as it caused a type error and it would only allow the very first user in list to display when using the sessions command. This is commented because a future feature can allow picking which user in list to grab info from, instead of all the sessions.users
variable is neither a dict or list, then it will raise a ModuleFailed error.Pre-Merge Tasks
python-black
isort
flake8
on repo, and fixed any new problems w/ modified filespytest
test cases[Unreleased]
)