Skip to content

Commit

Permalink
Merge 8741fcc into 9b923b4
Browse files Browse the repository at this point in the history
  • Loading branch information
LilSpazJoekp committed Feb 25, 2023
2 parents 9b923b4 + 8741fcc commit cfe1548
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Expand Up @@ -15,6 +15,7 @@ Unreleased

- An issue with iterating :class:`.ModNote` when a user has more than a hundred notes.
- An issue when uploading media to submit.
- Removal reasons are now returned in the same order as they appear on Reddit.

7.6.1 (2022/11/28)
------------------
Expand Down
6 changes: 4 additions & 2 deletions asyncpraw/models/reddit/removal_reasons.py
Expand Up @@ -178,8 +178,10 @@ async def _removal_reason_list(self) -> List[RemovalReason]:
API_PATH["removal_reasons_list"].format(subreddit=self.subreddit)
)
return [
RemovalReason(self._reddit, self.subreddit, _data=reason_data)
for id, reason_data in response["data"].items()
RemovalReason(
self._reddit, self.subreddit, _data=response["data"][reason_id]
)
for reason_id in response["order"]
]

@_deprecate_args("message", "title")
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/models/reddit/test_removal_reasons.py
Expand Up @@ -55,7 +55,7 @@ async def test_update_empty(self, reddit):
reddit.read_only = False
subreddit = await reddit.subreddit(pytest.placeholders.test_subreddit)
reasons = [reason async for reason in subreddit.mod.removal_reasons]
reason = reasons[0]
reason = reasons[8]
await reason.update()


Expand Down

0 comments on commit cfe1548

Please sign in to comment.