diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2023-06-30 14:33:43 -0700 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-07-25 15:50:21 -0400 |
| commit | d0729bde02a4fd7708fc9fce2dd779e9fb9ab342 (patch) | |
| tree | ef096e5f97010ee8e0cfc774a35b088409cbe055 /mesonbuild/templates/objcpptemplates.py | |
| parent | 3fdc877e8a971b3849784797dcc87045aefcd42a (diff) | |
| download | meson-d0729bde02a4fd7708fc9fce2dd779e9fb9ab342.tar.gz | |
templates: move initializer to base class
Every class implements the exact same initializer, simplify this by
putting it in the base class initializer
Diffstat (limited to 'mesonbuild/templates/objcpptemplates.py')
| -rw-r--r-- | mesonbuild/templates/objcpptemplates.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mesonbuild/templates/objcpptemplates.py b/mesonbuild/templates/objcpptemplates.py index 450f2b030..4ec785c18 100644 --- a/mesonbuild/templates/objcpptemplates.py +++ b/mesonbuild/templates/objcpptemplates.py @@ -13,9 +13,10 @@ # limitations under the License. from __future__ import annotations -from mesonbuild.templates.sampleimpl import SampleImpl import re +from mesonbuild.templates.sampleimpl import SampleImpl + lib_h_template = '''#pragma once #if defined _WIN32 || defined __CYGWIN__ @@ -126,10 +127,6 @@ test('basic', exe) class ObjCppProject(SampleImpl): - def __init__(self, options): - super().__init__() - self.name = options.name - self.version = options.version def create_executable(self) -> None: lowercase_token = re.sub(r'[^a-z0-9]', '_', self.name.lower()) |
