Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion praw/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
"accept_mod_invite": "r/{subreddit}/api/accept_moderator_invite",
"add_subreddit_rule": "api/add_subreddit_rule",
"add_whitelisted": "api/add_whitelisted",
"announcements_unread": "api/announcements/v1/unread",
"announcements_hide": "api/announcements/v1/hide",
"announcements_read": "api/announcements/v1/read",
"announcements_read_all": "api/announcements/v1/read_all",
"approve": "api/approve/",
"block": "api/block",
"block_user": "/api/block_user/",
Expand Down Expand Up @@ -105,7 +109,7 @@
"media_asset": "api/media/asset.json",
"mentions": "message/mentions",
"message": "message/messages/{id}/",
"messages": "message/messages/",
"messages": "message/messages",
"mod_notes": "api/mod/notes",
"mod_notes_bulk": "api/mod/notes/recent",
"moderated": "user/{user}/moderated_subreddits/",
Expand Down
2 changes: 1 addition & 1 deletion praw/models/mod_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ModNote(PRAWBase):

"""

def __eq__(self, other: ModNote) -> bool:
def __eq__(self, other: ModNote | str | object) -> bool:
"""Return whether the other instance equals the current."""
if isinstance(other, self.__class__):
return self.id == other.id
Expand Down
2 changes: 0 additions & 2 deletions praw/models/reddit/wikipage.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ class WikiPage(RedditBase):

"""

__hash__ = RedditBase.__hash__

@staticmethod
def _revision_generator(
*,
Expand Down
1 change: 1 addition & 0 deletions praw/reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ def _prepare_objector(self) -> None:
self.config.kinds["submission"]: models.Submission,
self.config.kinds["subreddit"]: models.Subreddit,
self.config.kinds["trophy"]: models.Trophy,
# "Announcement": models.Announcement,
"Button": models.Button,
"Collection": models.Collection,
"Draft": models.Draft,
Expand Down
1 change: 0 additions & 1 deletion tests/unit/models/reddit/test_inline_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def test_hash(self):
assert hash(media2) != hash(media3)
assert hash(media1) != hash(media3)


def test_pickle(self):
media = InlineMedia(path="path1", caption="caption1")
for level in range(pickle.HIGHEST_PROTOCOL + 1):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/models/reddit/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_hash(self):
assert hash(widget1) == hash(widget3)


class TestWidgets(UnitTest):
class TestSubredditWidgets(UnitTest):
def test_bad_attribute(self, reddit):
subreddit = reddit.subreddit(pytest.placeholders.test_subreddit)
widgets = subreddit.widgets
Expand Down
Loading