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 "Missing return statement" mypy error #49276

Closed

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Dec 12, 2020

Adds return None after assert_never in the inner get_one function
Without it, TestTypeHints.test_run_mypy_strict using mypy 0.770 fails with the above mentioned error, see https://app.circleci.com/pipelines/github/pytorch/pytorch/249909/workflows/597d8e34-ff04-4efa-9dde-9e28fbded341/jobs/9557705

Probably caused by python/mypy#8129

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@malfet malfet force-pushed the malfet/fix-missing-return-statement-mypy branch from 5177ab3 to 32e0511 Compare December 12, 2020 01:31
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@codecov
Copy link

codecov bot commented Dec 12, 2020

Codecov Report

Merging #49276 (32e0511) into master (6b78644) will increase coverage by 20.15%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master   #49276       +/-   ##
===========================================
+ Coverage   60.42%   80.58%   +20.15%     
===========================================
  Files        1718     1874      +156     
  Lines      171384   202766    +31382     
===========================================
+ Hits       103564   163402    +59838     
+ Misses      67820    39364    -28456     

@facebook-github-bot
Copy link
Contributor

@malfet merged this pull request in 8999915.

@malfet malfet deleted the malfet/fix-missing-return-statement-mypy branch December 12, 2020 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants