Debian Codegraph @

third_party/rust/uniffi_bindgen/src/bindings/python/templates/Protocol.py

raw
1 {# misnamed - a generic "abstract base class". Used as both a protocol and an ABC for traits. #}
2 class {{ protocol_name }}({{ protocol_base_class }}):
3 {%- call py::docstring_value(protocol_docstring, 4) %}
4 {%- for meth in methods.iter() %}
5 def {{ meth.name() }}(self, {% call py::arg_list_decl(meth) %}):
6 {%- call py::docstring(meth, 8) %}
7 raise NotImplementedError
8 {%- else %}
9 pass
10 {%- endfor %}