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

Fix mypy 0.800 plus when prepending $PYTHONPATH to sys.path #5698

Merged
merged 6 commits into from
Feb 1, 2021

Conversation

sumanthratna
Copy link
Contributor

@sumanthratna sumanthratna commented Jan 28, 2021

What does this PR do?

  • makes mypy not complain about trying to use str.split on None
  • fixes other mypy errors

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 update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read 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
  • Check that target branch and milestone match!

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented Jan 28, 2021

Codecov Report

Merging #5698 (9bc51f2) into master (6668ed7) will decrease coverage by 0%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #5698    +/-   ##
=======================================
- Coverage      93%     93%    -0%     
=======================================
  Files         134     134            
  Lines       10056    9916   -140     
=======================================
- Hits         9399    9236   -163     
- Misses        657     680    +23     

@Borda
Copy link
Member

Borda commented Jan 28, 2021

nice, but it seems that for some reason it fails in other places, mind fix it too?

@Borda Borda added the bug Something isn't working label Jan 28, 2021
@Borda Borda added this to the 1.1.x milestone Jan 28, 2021
@sumanthratna
Copy link
Contributor Author

nice, but it seems that for some reason it fails in other places, mind fix it too?

Do you mean the ~31 other mypy errors? I'd be happy to fix them (I initially didn't because I didn't want the PR to become too bloated)

@sumanthratna
Copy link
Contributor Author

nice, but it seems that for some reason it fails in other places, mind fix it too?

Do you mean the ~31 other mypy errors? I'd be happy to fix them

@Borda I have no idea why those are coming up (they should be ignored, according to setup.cfg). I'll keep thinking about this issue but for now, I think we should leave this PR as-is; what do you think?

@pep8speaks
Copy link

pep8speaks commented Jan 29, 2021

Hello @sumanthratna! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-02-01 00:25:43 UTC

@Borda
Copy link
Member

Borda commented Jan 29, 2021

nice, but it seems that for some reason it fails in other places, mind fix it too?

Do you mean the ~31 other mypy errors? I'd be happy to fix them

@Borda I have no idea why those are coming up (they should be ignored, according to setup.cfg). I'll keep thinking about this issue but for now, I think we should leave this PR as-is; what do you think?

yes, it is a known issue with recent 0.800 see python/mypy#8309
I have fixed it now so it shall be fine :]

@Borda Borda enabled auto-merge (squash) January 29, 2021 08:56
@Borda Borda changed the title Fix mypy when prepending $PYTHONPATH to sys.path Fix mypy 0.800 plus when prepending $PYTHONPATH to sys.path Jan 29, 2021
@Borda Borda self-assigned this Jan 29, 2021
@Borda Borda added the ready PRs ready to be merged label Jan 29, 2021
@Borda Borda merged commit 4218c59 into Lightning-AI:master Feb 1, 2021
@sumanthratna sumanthratna deleted the patch-2 branch February 1, 2021 01:13
tchaton pushed a commit that referenced this pull request Feb 5, 2021
* Fix mypy when prepending $PYTHONPATH to sys.path

* attempt mypy fix

* Revert "attempt mypy fix"

This reverts commit fb7ed82.

* fix mypy

Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
Borda added a commit that referenced this pull request Feb 5, 2021
* Fix mypy when prepending $PYTHONPATH to sys.path

* attempt mypy fix

* Revert "attempt mypy fix"

This reverts commit fb7ed82.

* fix mypy

Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
Borda added a commit that referenced this pull request Feb 5, 2021
* Fix mypy when prepending $PYTHONPATH to sys.path

* attempt mypy fix

* Revert "attempt mypy fix"

This reverts commit fb7ed82.

* fix mypy

Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants