Skip to content

Revert explicit linestyle kwarg on step() #11211

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

Merged
merged 1 commit into from
May 10, 2018

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented May 9, 2018

PR Summary

This is a selective revert of #11145 for the kwarg 'linestyle' of step().

The intention of #11145 is making relevant kwargs explicit by removing popping from kwargs.

The case here is different. 'linestyle' belongs to a whole set of style parameters that we do not explicitly state. It's not special from a signature point of view and thus should not be listed explicitly. The popping in the code is done for internal rewriting reasons.

@@ -1797,7 +1797,7 @@ def step(self, x, y, *args, where='pre', linestyle='', **kwargs):
if where not in ('pre', 'post', 'mid'):
raise ValueError("'where' argument to step must be "
"'pre', 'post' or 'mid'")
kwargs['linestyle'] = 'steps-' + where + linestyle
kwargs['linestyle'] = 'steps-' + where + kwargs.get('linestyle', '')
Copy link
Contributor

Choose a reason for hiding this comment

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

pop, no?

Copy link
Member

Choose a reason for hiding this comment

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

...he's overwriting the same kwarg...

@dstansby dstansby merged commit 60ff88f into matplotlib:master May 10, 2018
@timhoffm timhoffm deleted the remove-step-linestyle-kwarg branch May 14, 2018 06:43
@QuLogic QuLogic added this to the v3.0.0 milestone Nov 27, 2018
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.

5 participants