Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix Windows platform implementation ofsessions command#285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Acters wants to merge2 commits intocalebstewart:master
base:master
Choose a base branch
Loading
fromActers:master

Conversation

@Acters
Copy link

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:

  • Commented the hard codedusers = 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. Ifusers 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
  • [ + ] Ranflake8 on repo, and fixed any new problems w/ modified files
  • [ + ] Ranpytest test cases
  • [ + ] Added brief summary of updates to CHANGELOG (under[Unreleased])

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.
Added "sessions" command fix to CHANGELOG.md
@ActersActers changed the titleFix Windows platform implementation of Session commandFix Windows platform implementation ofsessions commandJun 23, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@Acters

[8]ページ先頭

©2009-2025 Movatter.jp