Re: [PATCH net-next 2/6] tools: ynl-gen: refactor render-max enum generation
From: Jakub Kicinski
Date: Mon Oct 13 2025 - 20:58:28 EST
On Mon, 13 Oct 2025 16:49:59 +0000 Asbjørn Sloth Tønnesen wrote:
> + suffix = yaml['type'] == 'flags' and 'mask' or 'max'
This construct looks highly non-pythonic to me
> + self.enum_max_name = f'{self.value_pfx}{suffix}'
sometimes its max sometimes is mask, so we shouldn't call it max always