You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Or in the IDE:
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.
Another note, in strict mode ("python.analysis.typeCheckingMode": "strict" in .vscode/settings.json) there are some warnings about missing stub files for praw.
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.unreadSee code example below.
Observe the type checker errors (from pyright):
Or in the IDE:
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
My code does not include sensitive credentials
Relevant Logs
This 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
The text was updated successfully, but these errors were encountered: