diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2023-06-30 14:58:30 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-07-25 15:50:21 -0400 |
commit | 5449d10f01bc765e33e041a15f7c90e752ba7539 (patch) | |
tree | 66ae8c35da4c517f3d8cad6a43817fe06603c328 /docs/yaml | |
parent | bbe649a5fc7bb0b955b2688c4d797b71830c8aeb (diff) | |
download | meson-5449d10f01bc765e33e041a15f7c90e752ba7539.zip meson-5449d10f01bc765e33e041a15f7c90e752ba7539.tar.gz meson-5449d10f01bc765e33e041a15f7c90e752ba7539.tar.bz2 |
templates: use a common template for C# and Java
The only real differences between these generators is the file extension
and the templates themselves. We can uses a shared abstract class
with a few abstract properties to provide all of this to the same base
class. This results in less code duplication and easier maintanence.
I've made a few cleanups to the shared template:
- use `str.capitalize()` instead of `str.upper()[0] + str[1:]`
- use `open` as a context manager
- use f-strings
- put some duplicate calculations in the initializer
Diffstat (limited to 'docs/yaml')
0 files changed, 0 insertions, 0 deletions