8000 Warn for missing returns with explicit Any return types by hauntsaninja · Pull Request #16102 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Warn for missing returns with explicit Any return types #16102

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

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 14, 2023
commit 86800e8fce0693710c97df6eec970946d143de57
4 changes: 2 additions & 2 deletions test-data/unit/check-warnings.test
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ def implicit(x: Any):
def explicit(x: Any) -> Any: # E: Missing return statement
if maybe():
return x

def explicit_with_none(x: Any) -> Any:
if maybe():
return x
return None

def explicit_with_just_return(x: Any) -> Any:
if maybe():
return x
Expand Down
0