Skip to content

Commit

Permalink
floogen(lint): Refactor nested f-string
Browse files Browse the repository at this point in the history
Nested f-strings are only supported in python 3.12, but `floogen` currently should support 3.10
  • Loading branch information
fischeti committed Jan 5, 2024
1 parent 0c42c58 commit ed8c0c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion floogen/model/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def render_enum_decl(cls):
for _, mapping in cls.channel_mapping.items():
for ch_type, axi_chs in mapping.items():
for axi_ch in axi_chs:
string += f"{snake_to_camel(f"{ch_type}_{axi_ch}")} = {i},\n"
name = f"{ch_type}_{axi_ch}"
string += f"{snake_to_camel(name)} = {i},\n"
i += 1
string += f"NumAxiChannels = {i}\n}} axi_ch_e;\n"
return string
Expand Down

0 comments on commit ed8c0c4

Please sign in to comment.