-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fix mypy errors attributed to pytorch_lightning/profilers/base.py #13879
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
Conversation
otaj
left a comment
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.
Hi @LeeChanHyuk. Thank you for your PR. However, you're not supposed to run mypy <file> but only mypy - the difference is that the latter takes into account whole codebase and not only things imported by the particular file.
When run like this on master branch with "pytorch_lightning.profilers.base" commented out from pyproject.toml, only one error pops up
src/pytorch_lightning/profilers/base.py:60: error: Function is missing a type annotation [no-untyped-def]
Found 1 errors in 1 file (checked 240 source files)
The reference check is the one happening on our CI, there you can see the errors
Codecov Report
@@ Coverage Diff @@
## master #13879 +/- ##
=========================================
- Coverage 86% 75% -11%
=========================================
Files 332 332
Lines 26049 26916 +867
=========================================
- Hits 22328 20130 -2198
- Misses 3721 6786 +3065 |
@otaj |
|
@LeeChanHyuk, no worries about being a beginner, we all started somehow 💜 First of all, the error would be solved perfectly fine if you did this: def __init__(self, *args: Any, **kwargs: Any):
...However! Since I have not been taking too hard of a look at particular pieces of code that should be fixed in the typing issue before, I just now realized, that we can safely close this PR. If you take a look, this class ( So, I am closing this PR for now, and on Monday, right after 1.7 release, there will be a call for action for removing features scheduled to be removed in 1.8. Please, sign up there. Thank you for your contribution ⚡ |
What does this PR do?
Fixes mypy typing errors in pytorch_lightning/profilers/base.py in #13445.
[Mypy error]
Does your PR introduce any breaking changes? If yes, please list them.
None
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Did you have fun?
I had fun doing this contribution. Thank you.