-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
fix: properly type ApplicationContext.author #2148
Conversation
Updated `author` property of `ApplicationContext` to include typehinting for applicable types. Signed-off-by: Kyle Pannan <[email protected]>
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.
Please add a changelog entry
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2148 +/- ##
=======================================
Coverage 33.86% 33.86%
=======================================
Files 109 109
Lines 22367 22367
=======================================
Hits 7575 7575
Misses 14792 14792
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
Would it go in added, changed, or fixed? |
I would say fixed since it's fixing bad typing, possibly added since there was no typehint to begin with |
In my opinion, it makes the most sense for "fixed," as well. |
I'm assuming something along the lines of
would be fine? |
Yes perfectly fine |
Signed-off-by: Kyle Pannan <[email protected]>
Update CHANGELOG.md
I believe I have added the changelog entry correctly. |
Updated
author
property ofApplicationContext
to include typehinting for applicable types.Summary
This change is intended to assist IDEs like pyCharm in both creating applicable warnings and code completion. This is done to fix The reason that I am trying to add typehinting is without it pycharm kinda just doesn't recognize that the author is an instance of Member or User and throws all kinds of errors when I add proper documentation.
Documentation example:
"""
The trade command for the bot. Allows users to trade with other users.
Without this change pycharm does not recognize that the author is an instance of Member or User.
Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.