From cd1c2dc3b54e0691cb3aa101db67411aa6075ce5 Mon Sep 17 00:00:00 2001 From: Nat Noordanus Date: Wed, 27 May 2020 10:56:52 +0200 Subject: [PATCH] Rename template file to avoid confusing black or other build tools --- betterproto/plugin.py | 2 +- betterproto/templates/{template.py => template.py.j2} | 0 setup.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename betterproto/templates/{template.py => template.py.j2} (100%) diff --git a/betterproto/plugin.py b/betterproto/plugin.py index 7f2a882..8eecef2 100755 --- a/betterproto/plugin.py +++ b/betterproto/plugin.py @@ -183,7 +183,7 @@ def generate_code(request, response): lstrip_blocks=True, loader=jinja2.FileSystemLoader("%s/templates/" % os.path.dirname(__file__)), ) - template = env.get_template("template.py") + template = env.get_template("template.py.j2") output_map = {} for proto_file in request.proto_file: diff --git a/betterproto/templates/template.py b/betterproto/templates/template.py.j2 similarity index 100% rename from betterproto/templates/template.py rename to betterproto/templates/template.py.j2 diff --git a/setup.py b/setup.py index 191a720..ca1d8c8 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( packages=find_packages( exclude=["tests", "*.tests", "*.tests.*", "output", "output.*"] ), - package_data={"betterproto": ["py.typed", "templates/template.py"]}, + package_data={"betterproto": ["py.typed", "templates/template.py.j2"]}, python_requires=">=3.6", install_requires=[ 'dataclasses; python_version<"3.7"',