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

Bug pylint 4122 #4304

Merged
merged 7 commits into from
Apr 7, 2021
Merged

Bug pylint 4122 #4304

merged 7 commits into from
Apr 7, 2021

Conversation

hippo91
Copy link
Contributor

@hippo91 hippo91 commented Apr 6, 2021

Steps

  • Add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

This PR allows declaring a never-returning-function by just specifying NoReturn as a return type hint.
Thus the emission of inconsistent-return-statements message won't be triggered if such functions are used.

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes #4122
Closes #4188

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 91.595% when pulling 4439015 on hippo91:bug_pylint_4122 into a47cb27 on PyCQA:master.

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Nice ! We could also change the code where we added a return None somewhere unreachable because of this pylint message. (The two unreachable code here : https://lgtm.com/projects/g/PyCQA/pylint/?mode=list)

This would be some real world test too :)

@cdce8p cdce8p merged commit 4168e80 into pylint-dev:master Apr 7, 2021
@cdce8p
Copy link
Member

cdce8p commented Apr 7, 2021

@Pierre-Sassoulas The two LGTM errors you mentioned can already be fixed. I'll open a MR shortly.

@cdce8p cdce8p mentioned this pull request Apr 7, 2021
4 tasks
@hippo91
Copy link
Contributor Author

hippo91 commented Apr 7, 2021

@cdce8p @Pierre-Sassoulas thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants