Initial add of types to the sequence class and the functions of transformation module
This is an initial commit for #118
The Sequence class has a parameter of no_wraps which is a keyword argument. By all indications, this is a boolean but the default parameter used was None. This can lead to confusion if not properly understood, so type hints have been included to specify it as a boolean, and the default parameter has been changed from None to False. They would run the same way, but False is more semantically accurate in this context.
The typing module is deprecated in more recent versions of python, but generics still need to be carried out using TypeVar until python 3.12. For backward compatibility using TypeVar is preferable.
Initial add of types to the sequence class and the functions of transformation module This is an initial commit for #118
The Sequence class has a parameter of
no_wraps
which is a keyword argument. By all indications, this is a boolean but the default parameter used was None. This can lead to confusion if not properly understood, so type hints have been included to specify it as a boolean, and the default parameter has been changed from None to False. They would run the same way, but False is more semantically accurate in this context.The typing module is deprecated in more recent versions of python, but generics still need to be carried out using
TypeVar
until python 3.12. For backward compatibility usingTypeVar
is preferable.