Skip to content

fix mypy typing errors in pytorch_lightning/__setup__.py #13472

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

Merged
merged 1 commit into from
Jul 1, 2022
Merged

fix mypy typing errors in pytorch_lightning/__setup__.py #13472

merged 1 commit into from
Jul 1, 2022

Conversation

CyprienRicque
Copy link
Contributor

@CyprienRicque CyprienRicque commented Jun 30, 2022

What does this PR do?

Fixes mypy typing errors in pytorch_lightning.__setup__.py in #13445 and propagate to other files containing the same edited code.

The AttributeError error that would have been raised if the assert call did not exist, does not seem to be caught elsewhere, so changing it to AssertionError has no impact on behavior.

Since the modified function _load_py_module is present in 4 additional files, I have copied the changes to these files as well to keep consistency.
It makes sense to me to do this in one PR, If I am supposed to do this in another PR please let me know

Does your PR introduce any breaking changes? If yes, please list them.

None

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

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:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@carmocca carmocca added this to the pl:1.7 milestone Jun 30, 2022
@carmocca carmocca added code quality community This PR is from the community and removed refactor labels Jun 30, 2022
@mergify mergify bot added the ready PRs ready to be merged label Jun 30, 2022
@otaj otaj enabled auto-merge (squash) July 1, 2022 07:29
@otaj
Copy link
Contributor

otaj commented Jul 1, 2022

Hi @Cyprien-Ricque , this looks good, thank you! It cannot be merged at the moment though because of the fact you're also editing lightning_app stuff and we have a hard block on that for the community currently. The block is gonna be removed in the very near future though, hopefully you don't mind :) (somewhere between a day and a month at most)

@lexierule lexierule disabled auto-merge July 1, 2022 12:36
@lexierule lexierule merged commit f65aa74 into Lightning-AI:master Jul 1, 2022
@CyprienRicque CyprienRicque changed the title fix mypy typing errors in pytorch_lightning.__setup__.py fix mypy typing errors in pytorch_lightning/__setup__.py Jul 4, 2022
jerome-habana pushed a commit to jerome-habana/lightning that referenced this pull request Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality community This PR is from the community ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants