8000 Fix `[func-returns-value]` not being trigged when calling decorated functions by brianschubert · Pull Request #18015 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Fix [func-returns-value] not being trigged when calling decorated functions #18015

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
Next Next commit
Update test with changed behavior
  • Loading branch information
brianschubert committed Oct 22, 2024
commit 5cc0f238998b853e8a8a333c99b57f3fb99a9164
4 changes: 2 additions & 2 deletions test-data/unit/check-optional.test
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ reveal_type(z2) # N: Revealed type is "Union[Literal[0], builtins.str, None]"

[case testLambdaReturningNone]
f = lambda: None
x = f()
reveal_type(x) # N: Revealed type is "None"
x = f() # E: Function does not return a value (it only ever returns None)
reveal_type(x) # N: Revealed type is "Any"

[case testNoneArgumentType]
def f(x: None) -> None: pass
Expand Down
Loading
0