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

Returning implicit none can break type signature #134

Open
acbart opened this issue Nov 14, 2024 · 0 comments
Open

Returning implicit none can break type signature #134

acbart opened this issue Nov 14, 2024 · 0 comments

Comments

@acbart
Copy link
Collaborator

acbart commented Nov 14, 2024

Functions don't have to have an explicit return statement. In that case, they return None. If a signature defines that the function returns something else, like a string, then this is incorrect. However, TIFA currently will allow this in the case where there was at least one other return statement in the function that returned the right type. We need to check if the current path has a return statement, and if so, then check that. We cannot rely on there just being a return anywhere in the body. This might be a matter of checking that the return was DEFINITELY set, not MAYBE set.

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

No branches or pull requests

1 participant