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

Method depth

mypyc/ir/rtypes.py:1071–1079  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1069 return False
1070
1071 def depth(self) -> int:
1072 item_type = self.item_type
1073 if isinstance(item_type, RUnion):
1074 value_type = optional_value_type(item_type)
1075 assert value_type is not None
1076 item_type = value_type
1077 if isinstance(item_type, RVec):
1078 return 1 + item_type.depth()
1079 return 0
1080
1081 def field_type(self, name: str) -> RType:
1082 if name == "len":

Callers 11

__str__Method · 0.95
vec_appendFunction · 0.80
vec_extendFunction · 0.80
vec_popFunction · 0.80
vec_removeFunction · 0.80
vec_sliceFunction · 0.80
supports_vec_to_sequenceFunction · 0.80
vec_from_iterableFunction · 0.80
emit_castMethod · 0.80
emit_unboxMethod · 0.80
emit_boxMethod · 0.80

Calls 2

isinstanceFunction · 0.85
optional_value_typeFunction · 0.85

Tested by

no test coverage detected