MCPcopy Index your code
hub / github.com/python/mypy / is_generic

Function is_generic

mypy/stats.py:475–477  ·  view source on GitHub ↗
(t: Type)

Source from the content-addressed store, hash-verified

473
474
475def is_generic(t: Type) -> bool:
476 t = get_proper_type(t)
477 return isinstance(t, Instance) and bool(t.args)
478
479
480def is_complex(t: Type) -> bool:

Callers 1

is_complexFunction · 0.85

Calls 3

get_proper_typeFunction · 0.90
isinstanceFunction · 0.85
boolClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…