Skip to content

Commit 6dea283

Browse files
committed
Change template extensions to .j2 for better syntax highlighting
1 parent 96a6f82 commit 6dea283

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

scripts/generate_tmpl.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@ def make_jinja_env(import_dir: Path) -> Environment:
2424

2525
def generate_gdapi_ptrs(api: ExtensionApi) -> str:
2626
env = make_jinja_env(BASEDIR / "../src/godot/_hazmat")
27-
template = env.get_template("gdapi_ptrs.tmpl.pxi")
27+
template = env.get_template("gdapi_ptrs.pxi.j2")
2828
return template.render(api=api)
2929

3030

3131
def generate_builtins_pxd(api: ExtensionApi) -> str:
3232
env = make_jinja_env(BASEDIR / "../src/godot")
33-
template = env.get_template("_builtins.tmpl.pxd")
33+
template = env.get_template("_builtins.pxd.j2")
3434
return template.render(api=api)
3535

3636

3737
def generate_builtins_pyx(api: ExtensionApi) -> str:
3838
env = make_jinja_env(BASEDIR / "../src/godot")
39-
template = env.get_template("_builtins.tmpl.pyx")
39+
template = env.get_template("_builtins.pyx.j2")
4040
return template.render(api=api)
4141

4242

4343
def generate_builtins_pyi(api: ExtensionApi) -> str:
4444
env = make_jinja_env(BASEDIR / "../src/godot")
45-
template = env.get_template("_builtins.tmpl.pyi")
45+
template = env.get_template("_builtins.pyi.j2")
4646
return template.render(api=api)
4747

4848

File renamed without changes.
File renamed without changes.

src/godot/_builtins.tmpl.pyx renamed to src/godot/_builtins.pyx.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{%- from '_builtins_pyx/class.tmpl.pxi' import render_spec -%}
1+
{%- from '_builtins_pyx/class.j2' import render_spec -%}
22
# /!\ Autogenerated code, modifications will be lost /!\
33
# see `scripts/generate_tmpl.py`
44

src/godot/_builtins_pyx/class.tmpl.pxi renamed to src/godot/_builtins_pyx/class.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{%- from '_builtins_pyx/constructor.tmpl.pxi' import render_constructor -%}
2-
{%- from '_builtins_pyx/gdapi.tmpl.pxi' import render_gdapi -%}
1+
{%- from '_builtins_pyx/constructor.j2' import render_constructor -%}
2+
{%- from '_builtins_pyx/gdapi.j2' import render_gdapi -%}
33

44
{% macro render_spec(spec) -%}
55

File renamed without changes.
File renamed without changes.

src/godot/_hazmat/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pxi_gdapi_ptrs = custom_target(
3939
input: [
4040
generate_tmpl_base_input,
4141
files(
42-
'gdapi_ptrs.tmpl.pxi',
42+
'gdapi_ptrs.pxi.j2',
4343
),
4444
pxd_godot__hazmat_gdnative_interface,
4545
],

src/godot/meson.build

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ custom_target(
4141
output: '_builtins.pyi',
4242
input: [
4343
generate_tmpl_base_input,
44-
files('_builtins.tmpl.pyi'),
44+
files('_builtins.pyi.j2'),
4545
],
4646
command: generate_tmpl_cmd,
4747
install: true,
@@ -66,10 +66,10 @@ pyx_builtins = custom_target(
6666
input: [
6767
generate_tmpl_base_input,
6868
files(
69-
'_builtins.tmpl.pyx',
70-
'_builtins_pyx/class.tmpl.pxi',
71-
'_builtins_pyx/constructor.tmpl.pxi',
72-
'_builtins_pyx/gdapi.tmpl.pxi',
69+
'_builtins.pyx.j2',
70+
'_builtins_pyx/class.j2',
71+
'_builtins_pyx/constructor.j2',
72+
'_builtins_pyx/gdapi.j2',
7373
),
7474
],
7575
command: generate_tmpl_cmd,

0 commit comments

Comments
 (0)