MCPcopy Create free account
hub / github.com/python/mypy / is_tricky_callable

Function is_tricky_callable

mypy/suggestions.py:826–828  ·  view source on GitHub ↗

Is t a callable that we need to put a ... in for syntax reasons?

(t: CallableType)

Source from the content-addressed store, hash-verified

824
825
826def is_tricky_callable(t: CallableType) -> bool:
827 """Is t a callable that we need to put a ... in for syntax reasons?"""
828 return t.is_ellipsis_args or any(k.is_star() or k.is_named() for k in t.arg_kinds)
829
830
831class TypeFormatter(TypeStrVisitor):

Callers 4

score_typeMethod · 0.85
any_score_typeFunction · 0.85
visit_callable_typeMethod · 0.85
refine_callableFunction · 0.85

Calls 3

anyFunction · 0.85
is_starMethod · 0.80
is_namedMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…