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
Rename Signal
and Model
__call__
methods and remove Component.__call__
method.
#3238
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## RELEASE_next_major #3238 +/- ##
======================================================
- Coverage 81.17% 80.98% -0.20%
======================================================
Files 140 140
Lines 20363 20359 -4
Branches 4819 4819
======================================================
- Hits 16530 16488 -42
- Misses 2760 2808 +48
+ Partials 1073 1063 -10
☔ View full report in Codecov by Sentry. |
The alternative is to make the PR to the exspy branch just need to push the exspy branch to this repo (hyperspy/hyperspy) and change to that branch in this PR. |
@@ -0,0 +1,5 @@ | |||
Improve the readibility fo the code by replacing the ``__call__`` method of some objects with the more explicit ``_get_current_data``. |
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.
It may be worth mentioned explicitly that s()
where s
being an instance of BaseSignal
is removed. Most users will not know that s()
is the same as s.__call__
.
As this privatise this functionality, it may be worth mentioned it explicitly here?
Description of the change
Rename the
Model
andSignal
__call__
methods to_get_current_data
and remove the unusedComponent.__call__
method.While the previous syntax was compact, it was making the code hard to read for those who were not familiar with it.
Progress of the PR
upcoming_changes
folder (seeupcoming_changes/README.rst
),readthedocs
doc build of this PR (link in github checks)