minor issue: Out of date docstring.
Description
The sym instantiation parameter of the PowerSeriesProfile is declared to be bool in the class docstring and while it is set to a str in the default values.
What should be the type for this is input?
Proposition
- Non API breaking: Add some type hint to the
__init__ function to clarify the expected usage:
def __init__(self, params=None, modes=None, sym="auto", name=""):
can become
def __init__(self, params: Sequence | None, modes: Sequence | None, sym: bool | Literal["auto", "even"] = "auto", name: str)
And make type checking happy.
- API simplification (can break dependent use-cases): make the sym input a string input and type hint it as a literal:
Literal["odd", "even", "auto"] = "auto"
and update the docstring accordingly 😃.
Happy to open a PR for if you are interested.
minor issue: Out of date docstring.
Description
The
syminstantiation parameter of thePowerSeriesProfileis declared to beboolin the class docstring and while it is set to astrin the default values.What should be the type for this is input?
Proposition
__init__function to clarify the expected usage:can become
And make type checking happy.
Literal["odd", "even", "auto"] = "auto"and update the docstring accordingly 😃.
Happy to open a PR for if you are interested.