aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/templates/ctemplates.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-09-01 14:27:10 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2020-09-08 20:15:58 +0200
commit1b19822a2df7ff969e3734973f131df9ed9d2ee3 (patch)
treecf0594943c705e59dfba531971b12070d8aa5bb2 /mesonbuild/templates/ctemplates.py
parent62f7642a6152ddaafbe8b5fd9eb7b19e8d87c079 (diff)
downloadmeson-1b19822a2df7ff969e3734973f131df9ed9d2ee3.zip
meson-1b19822a2df7ff969e3734973f131df9ed9d2ee3.tar.gz
meson-1b19822a2df7ff969e3734973f131df9ed9d2ee3.tar.bz2
typing: Fix templates
Diffstat (limited to 'mesonbuild/templates/ctemplates.py')
-rw-r--r--mesonbuild/templates/ctemplates.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/templates/ctemplates.py b/mesonbuild/templates/ctemplates.py
index 30acef3..440731c 100644
--- a/mesonbuild/templates/ctemplates.py
+++ b/mesonbuild/templates/ctemplates.py
@@ -129,7 +129,7 @@ class CProject(SampleImpl):
self.name = options.name
self.version = options.version
- def create_executable(self):
+ def create_executable(self) -> None:
lowercase_token = re.sub(r'[^a-z0-9]', '_', self.name.lower())
source_name = lowercase_token + '.c'
open(source_name, 'w').write(hello_c_template.format(project_name=self.name))
@@ -138,7 +138,7 @@ class CProject(SampleImpl):
source_name=source_name,
version=self.version))
- def create_library(self):
+ def create_library(self) -> None:
lowercase_token = re.sub(r'[^a-z0-9]', '_', self.name.lower())
uppercase_token = lowercase_token.upper()
function_name = lowercase_token[0:3] + '_func'