Skip to content
New issue

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

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

Already on GitHub? # to your account

BUG: Fix line analysis results logic #934

Merged
merged 1 commit into from
Oct 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,5 @@ def _run_functions(self, *args, **kwargs):
temp_result = FUNCTIONS[function](self._spectrum1d)

temp_results.append({'function': function, 'result': str(temp_result)})
self.result_available = True

self.results = []
Copy link
Member

Choose a reason for hiding this comment

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

I've seen this elsewhere with a comment that its to trick the traitlets into forcing an update... is it ok to remove here? Can we remove it everywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It still updates fine locally for me with this patch, but I cannot guarantee globally.

If you think this patch is invalid, then feel free to close without merge.

Copy link
Member

Choose a reason for hiding this comment

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

It works fine for me locally, too. Looking at the surrounding code more it looks like it will always be overwriting the default empty list anyways, so I see no reason why it would need to be set to empty a first. I'm more just wondering if we can cleanup other plugins by removing similar logic, but that's clearly out of scope for this PR.

self.results = temp_results
self.result_available = True
self.results = temp_results