Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate that 'self' is present in the init signature of a Parameterized class #786

Merged
merged 5 commits into from
Jul 10, 2023

Conversation

maximlt
Copy link
Member

@maximlt maximlt commented Jul 4, 2023

Fixes #785

@maximlt maximlt changed the title Validate that 'self' if present in the init signature of a Parameterized class Validate that 'self' is present in the init signature of a Parameterized class Jul 4, 2023
@maximlt maximlt requested a review from hoxbro July 4, 2023 10:43
Copy link
Member

@hoxbro hoxbro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe make a subclass with a custom __init__ and use that as a base to not mess around with param.Parameterized directly.

Maybe also have an example with a parameter in it with a non-default (If it does not already exist.)

This still needs a change in Holoviews, correct?

tests/testparameterizedrepr.py Outdated Show resolved Hide resolved
@maximlt
Copy link
Member Author

maximlt commented Jul 10, 2023

I addressed your comments.

Maybe also have an example with a parameter in it with a non-default (If it does not already exist.)

testparameterizedrepr has a number of .param.pprint tests, including testing classes with an __init__ that has positional only arguments.

Co-authored-by: Simon Høxbro Hansen <simon.hansen@me.com>
@maximlt maximlt merged commit 23dde8e into main Jul 10, 2023
@maximlt maximlt deleted the fix_argspec_signature_overriden branch July 10, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

param.pprint breaks if HoloViews is imported
2 participants