My Pain
I'm developing my applications in the VS Code editor. Furthermore I use pylint and mypy to help me create code of high quality. And google style docstring for documentation.
Param unfortunately does not work that well with that.
I've tried something like that.
class Scatter2dWithSelectionComponent(param.Parameterized):
"""The Scatter2dWithSelectionComponent enables a user to
- provide a DataFrame of data
Parameters
----------
data : pd.DataFrame
A dataframe of data to be shown and selected
"""
data: pd.DataFrame = param.DataFrame(precedence=0.1)
But
- VS Code cannot provide tab completion for
instance.data. or help text on hover of instance.data.
- Pylint complains for example that
E1101: Instance of 'DataFrame' has no 'iloc' member (no-member) if I have a line like instance.data.iloc.
Solution
Support static type checking and enable all the help you can get in modern editors.
My Pain
I'm developing my applications in the VS Code editor. Furthermore I use pylint and mypy to help me create code of high quality. And google style docstring for documentation.
Param unfortunately does not work that well with that.
I've tried something like that.
But
instance.data.or help text on hover ofinstance.data.E1101: Instance of 'DataFrame' has no 'iloc' member (no-member)if I have a line likeinstance.data.iloc.Solution
Support static type checking and enable all the help you can get in modern editors.