-
-
Notifications
You must be signed in to change notification settings - Fork 487
Closed
Labels
VerifiedConfirmed bug or issueConfirmed bug or issue⭐️ New Contributor Friendly ⭐️Good for newcomersGood for newcomers
Description
Describe the Bug
Steps:
make a call to reddit.inbox.unread(limit=None), as described in https://praw.readthedocs.io/en/stable/code_overview/reddit/inbox.html#praw.models.Inbox.unread
See code example below.
Observe the type checker errors (from pyright):
praw_hints_example.py:6:39 - error: Argument of type "None" cannot be assigned to parameter "limit" of type "str | int | dict[str, str]" in function "unread"
Type "None" is not assignable to type "str | int | dict[str, str]"
"None" is not assignable to "str"
"None" is not assignable to "int"
"None" is not assignable to "dict[str, str]" (reportArgumentType)
Note: The program runs without crashing but I don't know if it behaves correctly because I don't have an available unread feed which exceeds the default limit of 100.
Desired Result
No type error should show
Code to reproduce the bug
import praw
def example(reddit: praw.Reddit):
items = reddit.inbox.unread(limit=None)
for item in items:
print(item)My code does not include sensitive credentials
- Yes, I have removed sensitive credentials from my code.
Relevant Logs
N/AThis code has previously worked as intended
I'm not sure, I haven't used this code before.
Operating System/Environment
Ubuntu 23.10
Python Version
3.11.6
PRAW Version
7.8.1
Links, references, and/or additional comments?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
VerifiedConfirmed bug or issueConfirmed bug or issue⭐️ New Contributor Friendly ⭐️Good for newcomersGood for newcomers
