Mistake in type hints for tuples
BSchilperoort opened this issue · 2 comments
BSchilperoort commented
The type hints of the Bmi
class have a couple of return types as tuple[str]
. For example:
Line 106 in 793f566
However, in python's typing system this means a tuple containing a single string. For a tuple of strings the correct type hint is:
def get_input_var_names(self) -> tuple[str, ...]:
To quote the Python documentation on this:
To denote a tuple which could be of any length, and in which all elements are of the same type T, use tuple[T, ...].
mdpiper commented
@BSchilperoort Thank you for catching this. I learned something new about type hints!