Skip to content

Commit 38337a8

Browse files
authored
Rework how we refine information from callable() (#4343)
Don't assume that something is *not* callable except when operating on Union types. Normally, when operating on an Instance that is not clearly callable, construct a callable version of it by generating a fake subclass with a __call__ method. When operating on Union types, continue treating types that are not clearly callable as if they cannot be callable, so type discrimination using callable() behaves as expected. Fixes #3605
1 parent f7f35e4 commit 38337a8

File tree

6 files changed

+457
-241
lines changed

6 files changed

+457
-241
lines changed

0 commit comments

Comments
 (0)