Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reddit.subreddit.mod.removal_reasons isn't indexed in display order #1924

Closed
computerologist opened this issue Dec 24, 2022 · 4 comments · Fixed by #1934
Closed

reddit.subreddit.mod.removal_reasons isn't indexed in display order #1924

computerologist opened this issue Dec 24, 2022 · 4 comments · Fixed by #1934
Labels
Bug Something isn't working

Comments

@computerologist
Copy link

Describe the Bug

reddit.subreddit.mod.removal_reasons isn't indexed in display order

Desired Result

reddit.subreddit.mod.removal_reasons should be indexed in display order

Relevant Logs

No response

Code to reproduce the bug

No response

My code example does not include the Reddit() initialization to prevent credential leakage.

Yes

This code has previously worked as intended.

Yes

Operating System/Environment

windows

Python Version

python 3.9.1

PRAW Version

7.4.0

Prawcore Version

2.3.0

Anything else?

No response

@LilSpazJoekp
Copy link
Member

Could you elaborate or provide a code snippet showing how they aren't in order?

@computerologist
Copy link
Author

Sure thing, although since grabbing these is a .mod action, you will need to replace the subreddit with one you moderate. Also it looks like it could be possible that they'd end up in order, but I am not seeing that happen on a reddit with 12 removal reasons. Misordering is consistent with new objects.

rrs = reddit.subreddit('yoursub').mod.removal_reasons

rrs[0].title # may not be the 0th index removal reason listed on reddit.com

# or just print em all out and compare to the list on reddit.com -- more likely to show mis-ordering

for rr in rrs:
    print(rr.title)

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

Remove the Stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale Issue or pull request has been inactive for 20 days label Jan 24, 2023
@computerologist
Copy link
Author

Why would it be closed? It's still an issue.

@LilSpazJoekp LilSpazJoekp added Bug Something isn't working and removed Stale Issue or pull request has been inactive for 20 days labels Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants