-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
Type subreddit #1587
Type subreddit #1587
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! There was just one thing I was unsure about.
from urllib.parse import urljoin | ||
from xml.etree.ElementTree import XML | ||
|
||
import websocket | ||
from prawcore import Redirect | ||
from requests import Response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like Response
is only used in a type signature. Should this be under if TYPE_CHECKING:
?
I'm not very familiar with the intricacies of Python's typing
, so I'm just curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imported Response because it doesn't interfere with the import chain. I put under if TYPE_CHECKING
anything that could cause a circular import loop, or anything else that I imported from PRAW. However, I highly doubt a third-party package would form such a loop.
Could you resolve conflicts? |
Could you please run pre-push again? It looks black is having issues with it. |
Could you rebase the changes from master instead of merge please? |
Can you merge and squash? |
I would prefer if you did a rebase. Squash and merge doesn't create a merge commit. |
Could you rebase and squash please? |
I'll get this finished up for you. |
This PR is dependent on #1681 being merged. |
This is the typed version of subreddit.py