-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels