You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perform implicit return validation even when untyped-def-behavior is set to check-and-infer-return-any
Summary:
When `untyped-def-behavior` is set to `check-and-infer-return-any` and a given function has an explicit return annotation, Pyrefly currently refuses to validate implicit return type against that annotation. e.g.
```
def foo() -> int:
pass # No error!
```
It turns out that pre-existing logic conflates the two concept of "whether to infer return type" with "whether an implicit return type exists". As a result when return type inference is disabled, we disable implicit return validation as well which is not good. Let's separate those two pieces of info out!
Reviewed By: rchen152
Differential Revision: D81830223
fbshipit-source-id: a1cb04002fce42a008ab84c83bd736ca77b71926
0 commit comments