#
# This file is autogenerated, do not edit manually. Instead,
# edit {{ config.data }}
#

import typing

from hal_impl.data import hal_data

class {{ module_name }}{% if inherits is defined %}({{ inherits }}){% endif %}:

    def __init__(self):
        self.create_called = False

  {% for fn in header.functions %}
  {% if 'ignore' not in fn.data %}
    def {{ fn.x_name }}(self{{ fn.py_self_comma }}{{ fn.x_in_params | join(', ', attribute='x_pyann') }}) -> {{ fn.x_pyann_ret }}:
    {% if 'doc' in fn.data %}
        '''{{ fn.data['doc'] | indent(width=8) }}
        '''
    {% endif %}
    {% if fn.x_param_checks %}
        {{ fn.x_param_checks | join('\n') | indent(width=8) }}
    {% endif %}
    {% if 'code' in fn.data %}
        {{ fn.data['code'] | trim }}
    {% elif 'get' in fn.data %}
        return self.hal_data['{{ fn.data['get'] }}']
    {% elif 'set' in fn.data %}
        self.hal_data['{{ fn.data['set'] }}'] = {{ fn.parameters[1]['name'] }}
    {% endif %}

  {% endif %}
  {% endfor %}
