Home
last modified time | relevance | path

Searched refs:to_proto (Results 1 – 25 of 109) sorted by relevance

12345

/dports/science/py-cirq-ionq/Cirq-0.13.1/cirq-google/cirq_google/serialization/
H A Dop_serializer_test.py163 assert serializer.to_proto(GateWithAttribute(0)(q)) is None
177 serializer.to_proto(GateWithAttribute(1.0)(q))
188 serializer.to_proto(GateWithProperty(b's')(q))
199 result = serializer.to_proto(GateWithProperty(arg_value)(q))
243 serializer.to_proto(GateWithProperty(1.0)(q))
254 serializer.to_proto(GateWithProperty(1.0)(q))
304 serializer.to_proto(GateWithProperty(val)(q))
394 assert expected == serializer.to_proto(
456 serializer.to_proto(to_serialize)
459 serializer.to_proto(to_serialize, constants=constants)
[all …]
/dports/science/py-cirq-pasqal/Cirq-0.13.1/cirq-google/cirq_google/serialization/
H A Dop_serializer_test.py163 assert serializer.to_proto(GateWithAttribute(0)(q)) is None
177 serializer.to_proto(GateWithAttribute(1.0)(q))
188 serializer.to_proto(GateWithProperty(b's')(q))
199 result = serializer.to_proto(GateWithProperty(arg_value)(q))
243 serializer.to_proto(GateWithProperty(1.0)(q))
254 serializer.to_proto(GateWithProperty(1.0)(q))
304 serializer.to_proto(GateWithProperty(val)(q))
394 assert expected == serializer.to_proto(
456 serializer.to_proto(to_serialize)
459 serializer.to_proto(to_serialize, constants=constants)
[all …]
/dports/science/py-cirq-core/Cirq-0.13.1/cirq-google/cirq_google/serialization/
H A Dop_serializer_test.py163 assert serializer.to_proto(GateWithAttribute(0)(q)) is None
177 serializer.to_proto(GateWithAttribute(1.0)(q))
188 serializer.to_proto(GateWithProperty(b's')(q))
199 result = serializer.to_proto(GateWithProperty(arg_value)(q))
243 serializer.to_proto(GateWithProperty(1.0)(q))
254 serializer.to_proto(GateWithProperty(1.0)(q))
304 serializer.to_proto(GateWithProperty(val)(q))
394 assert expected == serializer.to_proto(
456 serializer.to_proto(to_serialize)
459 serializer.to_proto(to_serialize, constants=constants)
[all …]
/dports/science/py-cirq-google/Cirq-0.13.0/cirq-google/cirq_google/serialization/
H A Dop_serializer_test.py163 assert serializer.to_proto(GateWithAttribute(0)(q)) is None
177 serializer.to_proto(GateWithAttribute(1.0)(q))
188 serializer.to_proto(GateWithProperty(b's')(q))
199 result = serializer.to_proto(GateWithProperty(arg_value)(q))
243 serializer.to_proto(GateWithProperty(1.0)(q))
254 serializer.to_proto(GateWithProperty(1.0)(q))
304 serializer.to_proto(GateWithProperty(val)(q))
394 assert expected == serializer.to_proto(
456 serializer.to_proto(to_serialize)
459 serializer.to_proto(to_serialize, constants=constants)
[all …]
/dports/science/py-cirq-aqt/Cirq-0.12.0/cirq-google/cirq_google/serialization/
H A Dop_serializer_test.py177 assert serializer.to_proto(GateWithAttribute(0)(q)) is None
191 serializer.to_proto(GateWithAttribute(1.0)(q))
202 serializer.to_proto(GateWithProperty(b's')(q))
213 result = serializer.to_proto(GateWithProperty(arg_value)(q))
257 serializer.to_proto(GateWithProperty(1.0)(q))
268 serializer.to_proto(GateWithProperty(1.0)(q))
318 serializer.to_proto(GateWithProperty(val)(q))
408 assert expected == serializer.to_proto(
470 serializer.to_proto(to_serialize)
473 serializer.to_proto(to_serialize, constants=constants)
[all …]
/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/rust-analyzer/src/
H A Dhandlers.rs47 to_proto, LspError, Result,
218 to_proto::position(&line_index, offset) in handle_matching_brace()
246 Ok(to_proto::text_edit_vec(&line_index, res)) in handle_join_lines()
356 let url = to_proto::url(&snap, file_id); in handle_document_symbol()
470 .map(to_proto::symbol_kind) in handle_workspace_symbol()
1217 to_proto::code_lens(&mut res, &snap, a)?; in handle_code_lens()
1231 to_proto::code_lens(&mut acc, &snap, annotation)?; in handle_code_lens_resolve()
1259 range: to_proto::range(&line_index, range), in handle_document_highlight()
1283 to_proto::workspace_edit(&snap, source_change) in handle_ssr()
1626 let r = to_proto::runnable(snap, runnable).ok()?; in runnable_action_links()
[all …]
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/rust-analyzer/src/
H A Dhandlers.rs47 to_proto, LspError, Result,
213 to_proto::position(&line_index, offset) in handle_matching_brace()
241 Ok(to_proto::text_edit_vec(&line_index, res)) in handle_join_lines()
351 let url = to_proto::url(&snap, file_id); in handle_document_symbol()
465 .map(to_proto::symbol_kind) in handle_workspace_symbol()
1207 to_proto::code_lens(&mut res, &snap, a)?; in handle_code_lens()
1221 to_proto::code_lens(&mut acc, &snap, annotation)?; in handle_code_lens_resolve()
1249 range: to_proto::range(&line_index, range), in handle_document_highlight()
1273 to_proto::workspace_edit(&snap, source_change) in handle_ssr()
1616 let r = to_proto::runnable(snap, runnable).ok()?; in runnable_action_links()
[all …]
/dports/devel/py-proto-plus/proto-plus-1.19.6/proto/marshal/rules/
H A Dstruct.py60 def to_proto(self, value) -> struct_pb2.Value: member in ValueRule
74 list_value=self._marshal.to_proto(struct_pb2.ListValue, value),
78 struct_value=self._marshal.to_proto(struct_pb2.Struct, value),
97 def to_proto(self, value) -> struct_pb2.ListValue: member in ListValueRule
107 values=[self._marshal.to_proto(struct_pb2.Value, v) for v in value]
123 def to_proto(self, value) -> struct_pb2.Struct: member in StructRule
134 k: self._marshal.to_proto(struct_pb2.Value, v) for k, v in value.items()
H A Ddates.py42 def to_proto(self, value) -> timestamp_pb2.Timestamp: member in TimestampRule
70 def to_proto(self, value) -> duration_pb2.Duration: member in DurationRule
/dports/devel/bazel-buildtools/buildtools-3.2.1/vendor/github.com/google/skylark/skylarkstruct/testdata/
H A Dstruct.sky70 assert.eq(hasattr(bob, "to_proto"), True)
72 # to_proto
73 assert.eq(struct().to_proto(), '')
74 assert.eq(struct(int=1, float=3.141, str="hello", bool=True, intlist=[1, 2, 3]).to_proto(),
83 assert.eq(struct(x=struct(), y=[struct(a=1), struct(b=2, c=struct(p=1, q=2))]).to_proto(),
97 assert.fails(lambda: struct(none=None).to_proto(), 'cannot convert NoneType to proto')
98 assert.fails(lambda: struct(dict={}).to_proto(), 'cannot convert dict to proto')
/dports/devel/py-proto-plus/proto-plus-1.19.6/tests/
H A Dtest_marshal_types_message.py24 foo_pb2_a = message_rule.to_proto(Foo(bar=42))
25 foo_pb2_b = message_rule.to_proto(Foo.pb()(bar=42))
26 foo_pb2_c = message_rule.to_proto({"bar": 42})
H A Dtest_marshal_types_enum.py31 foo_a = enum_rule.to_proto(Foo.BAR)
32 foo_b = enum_rule.to_proto(1)
33 foo_c = enum_rule.to_proto("BAR")
/dports/science/py-cirq-ionq/Cirq-0.13.1/cirq-google/cirq_google/engine/
H A Dengine_timeslot_test.py90 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
114 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
140 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
164 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
188 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
H A Dcalibration_test.py114 assert calibration == cg.Calibration(calibration.to_proto())
117 invalid_value.to_proto()
143 assert expected_proto == calibration.to_proto()
145 assert calibration == cg.Calibration(calibration.to_proto())
/dports/science/py-cirq-pasqal/Cirq-0.13.1/cirq-google/cirq_google/engine/
H A Dengine_timeslot_test.py90 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
114 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
140 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
164 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
188 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
H A Dcalibration_test.py114 assert calibration == cg.Calibration(calibration.to_proto())
117 invalid_value.to_proto()
143 assert expected_proto == calibration.to_proto()
145 assert calibration == cg.Calibration(calibration.to_proto())
/dports/science/py-cirq-core/Cirq-0.13.1/cirq-google/cirq_google/engine/
H A Dengine_timeslot_test.py90 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
114 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
140 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
164 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
188 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
H A Dcalibration_test.py114 assert calibration == cg.Calibration(calibration.to_proto())
117 invalid_value.to_proto()
143 assert expected_proto == calibration.to_proto()
145 assert calibration == cg.Calibration(calibration.to_proto())
/dports/science/py-cirq-google/Cirq-0.13.0/cirq-google/cirq_google/engine/
H A Dengine_timeslot_test.py90 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
114 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
140 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
164 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
188 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
H A Dcalibration_test.py114 assert calibration == cg.Calibration(calibration.to_proto())
117 invalid_value.to_proto()
143 assert expected_proto == calibration.to_proto()
145 assert calibration == cg.Calibration(calibration.to_proto())
/dports/science/py-cirq-aqt/Cirq-0.12.0/cirq-google/cirq_google/engine/
H A Dengine_timeslot_test.py90 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
114 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
140 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
164 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
188 actual_to_proto = cg.EngineTimeSlot.to_proto(time_slot)
H A Dcalibration_test.py114 assert calibration == cg.Calibration(calibration.to_proto())
117 invalid_value.to_proto()
143 assert expected_proto == calibration.to_proto()
145 assert calibration == cg.Calibration(calibration.to_proto())
/dports/devel/py-proto-plus/proto-plus-1.19.6/proto/marshal/
H A Dmarshal.py176 def to_proto(self, proto_type, value, *, strict: bool = False): member in BaseMarshal
192 return type(value)(self.to_proto(proto_type, i) for i in value)
207 return {k: self.to_proto(recursive_type, v) for k, v in value.items()}
211 pb_value = rule.to_proto(value)
269 def to_proto(self, value): member in NoopRule
/dports/www/chromium-legacy/chromium-88.0.4324.182/mojo/public/tools/bindings/generators/mojolpm_templates/
H A Dmojolpm.h.tmpl46 {%- import "mojolpm_to_proto_macros.tmpl" as to_proto %}
82 {{- to_proto.declare(struct_type, kind, name) }}
110 {{- to_proto.declare(union_type, kind, name) }}
157 {{- to_proto.declare(method_type, kind, name)}}
169 {{- to_proto.declare(method_type, kind, name)}}
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/
H A Dlsif.rs24 use crate::to_proto;
108 range: to_proto::range(&line_index, id.range), in get_range_id()
137 contents: lsp_types::HoverContents::Markup(to_proto::markup_content( in add_token()
201 .map(|it| to_proto::folding_range(&*text, &line_index, false, it)) in add_file()
212 range: to_proto::range(&line_index, range), in add_file()

12345