-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Fixed docstring error with style.py, unknown parameter: {'text_color_threshold'} #48055
Fixed docstring error with style.py, unknown parameter: {'text_color_threshold'} #48055
Conversation
this looks good pending the checks and also have you rendered the docs, does it all display OK? |
Hi, I don't believe the changes I have made, contributed to the errors in the checks. Could you please clarify? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes the test failures are unrelated
pandas/io/formats/style.py
Outdated
low=low, | ||
high=high, | ||
axis=axis, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No real reason, I believe I was trying to match the order of the parameters in the docstring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind reverting this change for now (could be a follow up PR)? We want to avoid any potential unrelated behavior change as this was supposed to just adjust a docstring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a valid change, but can be easier to add it in a separate taregted PR after this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted the unnecessary changes
reverted unneeded changes
Revert unneeded changes
Thanks @joshuabello2550 |
…threshold'} (pandas-dev#48055) * fixed docstring error with style.py unknown paramter 'text_color_threshold' * Fixed docstring error with style.py, unknown parameter: text_color_threshold * Update style.py reverted unneeded changes * Update style.py Revert unneeded changes
When you run python
./scripts/validate_docstrings.py --errors=PR02
, one of the errors is/home/pandas/pandas/io/formats/style.py:3144:PR02:pandas.io.formats.style.Styler.text_gradient:Unknown parameters {'text_color_threshold'}
The error I believe was because the function text_gradient was using the doc-string for background gradient, which had text_color_threshold as one of the parameters, so validate doc-string expected text_gradient to also have text_color_threshold, even though that parameter was not intended for text_gradient.