Skip to content

Commit 997c830

Browse files
committed
Small cleanup
1 parent 649c045 commit 997c830

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

β€Žsrc/godot/builtins.pyi.j2β€Ž

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ IntoGDAny
6464

6565

6666
class {{ spec.name }}(Enum):
67-
{% for a in spec.values.keys() %}
68-
{{ a }}: int
67+
{% for key in spec.values.keys() %}
68+
{{ key }}: int
6969
{% endfor %}
7070
{% endfor %}
7171

@@ -89,6 +89,14 @@ def {{ spec.name }}(
8989
# Builtins #
9090
##############################################################################
9191
{% for spec in api["builtins"] if not spec.is_scalar %}
92+
{% for e in spec.enums %}
93+
94+
95+
class {{ e.name }}(Enum):
96+
{% for key in e.values.keys() %}
97+
{{ key }}: int
98+
{% endfor %}
99+
{% endfor %}
92100

93101

94102
class {{spec.name}}:
@@ -98,6 +106,8 @@ class {{spec.name}}:
98106
{% endfor %}
99107
{% if spec.members %}
100108

109+
def clone(self) -> {{ spec.name }}: ...
110+
101111
# Members
102112
{% endif %}
103113
{% for m in spec.members %}

β€Žsrc/godot/builtins_pyx/class.pyx.j2β€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{%- from 'builtins_pyx/constructor.pyx.j2' import render_constructors with context -%}
2-
{%- from 'builtins_pyx/member.pyx.j2' import render_member with context -%}
1+
{% from 'builtins_pyx/constructor.pyx.j2' import render_constructors with context %}
2+
{% from 'builtins_pyx/member.pyx.j2' import render_member with context %}
33

44

55
{% macro render_constant(spec, c) %}

β€Žsrc/godot/hazmat/gdapi.pxd.j2β€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{%- from 'gdapi_pxd/macros.pxd.j2' import
1+
{% from 'gdapi_pxd/macros.pxd.j2' import
22
render_utility_function_signature,
33
render_utility_function,
44
render_builtin_type_cy_struct,
@@ -8,7 +8,7 @@
88
render_builtin_method_signature,
99
render_builtin_all_functions,
1010
render_builtin_functions_ptrs
11-
-%}
11+
%}
1212
cimport cython
1313
from libc.stdint cimport *
1414

0 commit comments

Comments
Β (0)