Home
last modified time | relevance | path

Searched refs:isinstance (Results 1 – 25 of 2142) sorted by relevance

12345678910>>...86

/external/python/cpython3/Lib/
Dast.py45 if isinstance(node_or_string, str):
47 if isinstance(node_or_string, Expression):
50 if isinstance(node, Constant):
51 if isinstance(node.value, (int, float, complex)):
53 elif isinstance(node, Num):
57 if isinstance(node, UnaryOp) and isinstance(node.op, (UAdd, USub)):
59 if isinstance(node.op, UAdd):
65 if isinstance(node, Constant):
67 elif isinstance(node, (Str, Bytes)):
69 elif isinstance(node, Num):
[all …]
/external/bcc/src/cc/frontends/p4/compiler/
DebpfParser.py21 assert isinstance(serializer, programSerializer.ProgramSerializer)
22 assert isinstance(program, ebpfProgram.EbpfProgram)
37 assert isinstance(selectVarName, str)
38 assert isinstance(serializer, programSerializer.ProgramSerializer)
39 assert isinstance(program, ebpfProgram.EbpfProgram)
44 if isinstance(e, p4_field):
46 assert isinstance(instance, p4_header_instance)
51 assert isinstance(ebpfStack, ebpfInstance.EbpfHeaderStack)
53 if isinstance(instance.index, int):
64 assert isinstance(ebpfHeader, ebpfInstance.EbpfHeader)
[all …]
DebpfProgram.py24 assert isinstance(hlir, HLIR)
25 assert isinstance(isRouter, bool)
26 assert isinstance(config, target.TargetConfig)
35 assert isinstance(config, target.TargetConfig)
88 assert isinstance(h, p4_header_instance)
137 assert isinstance(headerInstance, p4_header_instance)
141 assert isinstance(formatString, str)
145 assert isinstance(serializer, programSerializer.ProgramSerializer)
186 if isinstance(self.config, target.KernelSamplesConfig):
189 elif isinstance(self.config, target.BccConfig):
[all …]
DebpfDeparser.py22 assert(isinstance(parse_state, p4_parse_state))
50 if not isinstance(next_state, p4_parse_state):
67 assert isinstance(serializer, ProgramSerializer)
68 assert isinstance(program, ebpfProgram.EbpfProgram)
83 assert isinstance(header, ebpfInstance.EbpfHeader)
84 assert isinstance(serializer, ProgramSerializer)
85 assert isinstance(program, ebpfProgram.EbpfProgram)
87 assert isinstance(p4header, p4_header_instance)
96 assert isinstance(ebpfStack, ebpfInstance.EbpfHeaderStack)
98 if isinstance(p4header.index, int):
[all …]
DebpfAction.py58 assert isinstance(p4action, p4_action)
59 assert isinstance(program, ebpfProgram.EbpfProgram)
86 assert isinstance(serializer, ProgramSerializer)
88 assert isinstance(arg, EbpfActionData)
91 assert isinstance(argtype, ebpfType.EbpfType)
108 assert isinstance(serializer, ProgramSerializer)
109 assert isinstance(program, ebpfProgram.EbpfProgram)
110 assert isinstance(dataContainer, str)
114 assert isinstance(action, p4_action)
116 assert isinstance(arguments, list)
[all …]
DebpfConditional.py24 assert isinstance(p4conditional, p4_conditional_node)
25 assert isinstance(program, ebpfProgram.EbpfProgram)
30 if isinstance(node, p4_expression):
34 elif isinstance(node, int):
36 elif isinstance(node, p4_header_instance):
38 assert isinstance(header, ebpfInstance.EbpfHeader)
42 elif isinstance(node, p4_field):
45 if isinstance(einstance, ebpfInstance.EbpfHeader):
55 assert isinstance(serializer, ProgramSerializer)
56 assert isinstance(program, ebpfProgram.EbpfProgram)
[all …]
DebpfTable.py16 assert isinstance(instance, ebpfInstance.EbpfInstanceBase)
17 assert isinstance(field, ebpfStructType.EbpfField)
25 assert isinstance(serializer, ProgramSerializer)
32 assert isinstance(serializer, ProgramSerializer)
33 assert isinstance(keyName, str)
34 assert isinstance(program, ebpfProgram.EbpfProgram)
41 if isinstance(self.instance, ebpfInstance.EbpfMetadata):
46 if isinstance(self.instance, ebpfInstance.SimpleInstance):
50 assert isinstance(self.instance, ebpfInstance.EbpfHeaderStack)
73 assert isinstance(program, ebpfProgram.EbpfProgram)
[all …]
Dtarget.py26 assert isinstance(serializer, ProgramSerializer)
34 assert isinstance(serializer, ProgramSerializer)
39 assert isinstance(serializer, ProgramSerializer)
40 assert isinstance(tableName, str)
41 assert isinstance(isHash, bool)
42 assert isinstance(keyType, str)
43 assert isinstance(valueType, str)
44 assert isinstance(size, int)
127 assert isinstance(serializer, ProgramSerializer)
128 assert isinstance(tableName, str)
[all …]
/external/python/cpython2/Lib/
Dast.py48 if isinstance(node_or_string, basestring):
50 if isinstance(node_or_string, Expression):
53 if isinstance(node, Str):
55 elif isinstance(node, Num):
57 elif isinstance(node, Tuple):
59 elif isinstance(node, List):
61 elif isinstance(node, Dict):
64 elif isinstance(node, Name):
67 elif isinstance(node, BinOp) and \
68 isinstance(node.op, (Add, Sub)) and \
[all …]
/external/libchrome/mojo/public/tools/bindings/pylib/mojom/parse/
Dast.py39 elif isinstance(item_or_items, list):
41 assert isinstance(item, self._list_item_type)
44 assert isinstance(item_or_items, self._list_item_type)
65 assert isinstance(item, self._list_item_type)
72 assert isinstance(item, self._list_item_type)
88 assert isinstance(mojom_name, str)
100 assert isinstance(key, str)
121 assert attribute_list is None or isinstance(attribute_list, AttributeList)
123 assert isinstance(typename, str)
126 assert isinstance(value, str) or isinstance(value, tuple)
[all …]
/external/llvm/bindings/python/llvm/tests/
Dtest_object.py21 assert isinstance(section, Section)
22 assert isinstance(section.name, str)
23 assert isinstance(section.size, long)
24 assert isinstance(section.contents, str)
25 assert isinstance(section.address, long)
39 assert isinstance(symbol, Symbol)
40 assert isinstance(symbol.name, str)
41 assert isinstance(symbol.address, long)
42 assert isinstance(symbol.size, long)
54 assert isinstance(section, Section)
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/bindings/python/llvm/tests/
Dtest_object.py21 assert isinstance(section, Section)
22 assert isinstance(section.name, str)
23 assert isinstance(section.size, long)
24 assert isinstance(section.contents, str)
25 assert isinstance(section.address, long)
39 assert isinstance(symbol, Symbol)
40 assert isinstance(symbol.name, str)
41 assert isinstance(symbol.address, long)
42 assert isinstance(symbol.size, long)
54 assert isinstance(section, Section)
[all …]
/external/tensorflow/tensorflow/contrib/labeled_tensor/python/ops/
D_typecheck.py86 return isinstance(instance, self._types)
97 return isinstance(instance, (self._type, type(None)))
107 return (isinstance(instance, list)
108 and all(isinstance(x, self._type) for x in instance))
118 return (isinstance(instance, collections.Sequence)
119 and all(isinstance(x, self._type) for x in instance))
134 return (isinstance(instance, collections.Iterable)
135 and isinstance(instance, collections.Sized)
136 and isinstance(instance, collections.Container)
137 and all(isinstance(x, self._type) for x in instance))
[all …]
/external/tensorflow/tensorflow/python/keras/utils/
Dtf_utils.py52 if isinstance(pred, variables.Variable):
74 if isinstance(pred, int):
80 if isinstance(pred, variables.Variable):
87 if v and isinstance(v[0], ops.Tensor):
115 if isinstance(x, tuple(_user_convertible_tensor_types)):
119 if isinstance(x, ops.Operation):
122 elif isinstance(x, variables.Variable):
205 return value is None or isinstance(value, (int, tensor_shape.Dimension))
211 if isinstance(input_shape, tensor_shape.TensorShape):
213 if (isinstance(input_shape, (tuple, list)) and
[all …]
/external/tensorflow/tensorflow/python/autograph/pyct/
Dast_util.py40 if isinstance(node, list):
42 elif isinstance(node, tuple):
44 elif not isinstance(node, (gast.AST, ast.AST)):
49 assert isinstance(node, (gast.AST, ast.AST))
108 if isinstance(node, list):
110 elif isinstance(node, tuple):
144 if isinstance(p, (list, tuple)) and len(p) == 1:
146 if isinstance(p, gast.Name) and p.id == '_':
174 if isinstance(v, (list, tuple)):
175 if not isinstance(p, (list, tuple)) or len(v) != len(p):
[all …]
/external/fonttools/Lib/fontTools/ufoLib/
Dvalidators.py27 if isinstance(value, Mapping):
38 return isinstance(value, typ)
44 if not isinstance(values, (list, tuple)):
51 if not isinstance(value, integerTypes):
59 if not isinstance(value, integerTypes):
69 if not isinstance(value, numberTypes):
80 if not isinstance(value, Mapping):
97 if not isinstance(v, prototypeType):
118 if not isinstance(value, list):
146 if not isinstance(value, basestring):
[all …]
/external/python/apitools/apitools/base/protorpclite/
Dprotojson.py108 if isinstance(value, messages.Enum):
111 if six.PY3 and isinstance(value, bytes):
114 if isinstance(value, messages.Message):
161 if isinstance(field, messages.BytesField):
166 elif isinstance(field, message_types.DateTimeField):
224 if isinstance(value, bool):
226 elif isinstance(value, six.integer_types):
228 elif isinstance(value, float):
230 elif isinstance(value, six.string_types):
232 elif isinstance(value, (list, tuple)):
[all …]
/external/python/cpython2/Lib/json/
Dencoder.py46 if isinstance(s, str) and HAS_UTF8.search(s) is not None:
194 if isinstance(o, basestring):
195 if isinstance(o, str):
208 if not isinstance(chunks, (list, tuple)):
232 if isinstance(o, str):
281 isinstance=isinstance, argument
312 if isinstance(value, basestring):
320 elif isinstance(value, (int, long)):
322 elif isinstance(value, float):
326 if isinstance(value, (list, tuple)):
[all …]
/external/python/cpython3/Lib/json/
Dencoder.py191 if isinstance(o, str):
200 if not isinstance(chunks, (list, tuple)):
267 isinstance=isinstance, argument
274 if _indent is not None and not isinstance(_indent, str):
301 if isinstance(value, str):
309 elif isinstance(value, int):
314 elif isinstance(value, float):
319 if isinstance(value, (list, tuple)):
321 elif isinstance(value, dict):
357 if isinstance(key, str):
[all …]
/external/python/cpython3/Lib/test/
Dtest_isinstance.py37 self.assertEqual(False, isinstance(I(), C()))
57 self.assertRaises(RuntimeError, isinstance, I(), C())
69 self.assertRaises(RuntimeError, isinstance, I(), C())
81 self.assertRaises(TypeError, isinstance, I(), C())
92 self.assertRaises(RuntimeError, isinstance, c, bool)
96 self.assertRaises(RuntimeError, isinstance, c, D)
191 self.assertEqual(True, isinstance(Super(), Super))
192 self.assertEqual(False, isinstance(Super(), Child))
193 self.assertEqual(False, isinstance(Super(), AbstractSuper))
194 self.assertEqual(False, isinstance(Super(), AbstractChild))
[all …]
/external/libaom/libaom/test/
Dgviz_api.py50 if isinstance(o, datetime.datetime):
60 elif isinstance(o, datetime.date):
62 elif isinstance(o, datetime.time):
209 if isinstance(value, tuple):
213 (len(value) == 3 and not isinstance(value[2], dict))):
216 if not isinstance(value[1], types.StringTypes + (types.NoneType,)):
229 if isinstance(value, (int, long, float)):
234 if isinstance(value, unicode):
240 if isinstance(value, datetime.datetime):
242 elif isinstance(value, datetime.date):
[all …]
/external/python/cpython2/Lib/bsddb/test/
Dtest_all.py73 if isinstance(key, bytes) :
92 if isinstance(k, str) :
102 if isinstance(k, str) :
120 if isinstance(key, str) :
122 if isinstance(data, str) :
138 if isinstance(key, int) and (data is None) and (flags == 0) :
141 if isinstance(key, str) :
143 if isinstance(data, int) and (flags==0) :
146 if isinstance(data, str) :
151 if isinstance(v1, bytes) :
[all …]
/external/tensorflow/tensorflow/python/training/saving/
Dsaveable_object_util.py82 if isinstance(var, ops.Tensor):
85 elif isinstance(var, resource_variable_ops.ResourceVariable):
119 return isinstance(v, ops.Tensor) and v.op.type in _VARIABLE_OPS
137 if not isinstance(name, six.string_types):
141 if isinstance(op, saveable_object.SaveableObject):
143 elif isinstance(op, (list, tuple, variables.PartitionedVariable)):
144 if isinstance(op, variables.PartitionedVariable):
150 if not isinstance(variable, variables.Variable):
168 elif isinstance(op, trackable.Trackable) and not isinstance(
183 if isinstance(op, resource_variable_ops.ResourceVariable):
[all …]
/external/chromium-trace/catapult/tracing/tracing/trace_data/
Dtrace_data.py67 assert isinstance(part, TraceDataPart)
80 if isinstance(trace, TraceFileHandle):
83 if isinstance(trace, basestring):
85 elif isinstance(trace, dict) or isinstance(trace, list):
138 assert isinstance(part, TraceDataPart)
147 if isinstance(data, TraceFileHandle):
152 assert isinstance(part, TraceDataPart)
165 if isinstance(trace, TraceFileHandle):
222 assert isinstance(partial_trace_data, basestring)
283 assert isinstance(part, TraceDataPart), part
[all …]
/external/autotest/client/cros/
Ddbus_util.py21 if isinstance(value, dbus.Boolean):
23 elif isinstance(value, int):
25 elif isinstance(value, dbus.UInt16):
27 elif isinstance(value, dbus.UInt32):
29 elif isinstance(value, dbus.UInt64):
31 elif isinstance(value, float):
33 elif isinstance(value, str):
35 elif isinstance(value, unicode):
37 elif isinstance(value, list):
39 elif isinstance(value, tuple):
[all …]

12345678910>>...86