Skip to content
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

(#1164) Add types to models/reddit/removal_reasons.py #1228

Merged
merged 1 commit into from
Dec 29, 2019
Merged

(#1164) Add types to models/reddit/removal_reasons.py #1228

merged 1 commit into from
Dec 29, 2019

Conversation

PythonCoderAS
Copy link
Contributor

#1164

-> ./praw/models/reddit/removal_reasons.py

@@ -26,17 +32,23 @@ class RemovalReason(RedditBase):

STR_FIELD = "id"

def __eq__(self, other):
def __eq__(self, other: _RemovalReason) -> bool:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do standard library type hints handle this case? There might be a better way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m pretty sure the standard library is filled with _T from trying to look at builtins and other modules, as many of them don’t call themselves

@bboe bboe merged commit f4b9954 into praw-dev:master Dec 29, 2019
@PythonCoderAS PythonCoderAS deleted the add-types-removal-reasons branch January 1, 2020 13:17
@PythonCoderAS PythonCoderAS added this to the Type all Modules milestone Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants