In effort to keep the python scripts consistent (as most developers are C++ devs, not python experts), please follow the following:
All helper functions should have the types strongly declared
def someFunction(varA: bool, varB: str = "default") -> str:
There are many ways to format a string in python, by default use f'string
function = f'void {name}(uint32_t {param}) {{ return true; }}'
f'string has some known limitations, in those cases it is ok to use .format
or template strings
out = []
out.append(getSomeString())
out.append(f'something {variable}')
self.write("".join(out))
These are the fastet
It is easy to start putting random \n
everywhere.
Each line to the string array is in charge of adding the \n
at the end, so each line can assume it will.
This is important when calling into utils that return strings