(typ: ProperType)
| 231 | |
| 232 | |
| 233 | def _arg_accepts_function(typ: ProperType) -> bool: |
| 234 | return ( |
| 235 | # TypeVar / Callable |
| 236 | isinstance(typ, (TypeVarType, CallableType)) |
| 237 | or |
| 238 | # Protocol with __call__ |
| 239 | isinstance(typ, Instance) |
| 240 | and typ.type.is_protocol |
| 241 | and typ.type.get_method("__call__") is not None |
| 242 | ) |
| 243 | |
| 244 | |
| 245 | class SuggestionEngine: |
no test coverage detected
searching dependent graphs…