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

Minor fixes for ScopeSimple #510

Merged
merged 2 commits into from
Nov 20, 2024
Merged

Minor fixes for ScopeSimple #510

merged 2 commits into from
Nov 20, 2024

Conversation

teutoburg
Copy link
Contributor

@teutoburg teutoburg commented Nov 20, 2024

Required for #496

@teutoburg teutoburg added bug Something isn't working enhancement New feature or request labels Nov 20, 2024
@teutoburg teutoburg self-assigned this Nov 20, 2024
@teutoburg
Copy link
Contributor Author

Nevermind the two force pushes, that was a silly messup...

@teutoburg
Copy link
Contributor Author

This is rather straightforward so I'll just merge it as soon as the docs build passes...

@teutoburg teutoburg marked this pull request as ready for review November 20, 2024 14:17
@teutoburg
Copy link
Contributor Author

This is rather straightforward so I'll just merge it as soon as the docs build passes...

Or maybe without that. RTD seems to have some issues today, but this shouldn't affect the docs anyway...

@teutoburg teutoburg merged commit 7a277c1 into main Nov 20, 2024
19 of 20 checks passed
@teutoburg teutoburg deleted the scopesimple-3 branch November 20, 2024 14:27
@@ -268,10 +269,11 @@ def plot(self, img_slice=None, adjust_scale=False, **kwargs):
" create an uneven image plot.")

vminmax = self._get_vminmax(adjust_scale)
fig_kwargs = kwargs.pop("fig_kwargs", {})
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm going to suggest this anyway: I think it would be better to just add fig_kwargs as an optional parameter to the function instead of popping it from kwargs. As far as I'm aware, there is no good argument for doing it this way; or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I did that first, but then there would be fig_kwargs followed by "normal" **kwargs (which go into the plot but not the figure), and also we'd need a default, but dict is mutable so need to use None, then need another line if fig_kwargs is None and so on. But maybe I should have done that rather than this intransparent implicit kwarg-popping. I'll probably change at some point...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants