-
Notifications
You must be signed in to change notification settings - Fork 514
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
ENH: Propagate args / kwargs to loadLoadables | ⚠️ Changes removed from main #7270
ENH: Propagate args / kwargs to loadLoadables | ⚠️ Changes removed from main #7270
Conversation
58f0779
to
0cbc3bb
Compare
0cbc3bb
to
dcc1fbb
Compare
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.
Thank you for your contribution, I agree that it can be useful to expose messages
and progressCallback
arguments at higher-level functions, too. I would prefer to explicitly specify these arguments, as it would make the API more clear (and 2 extra arguments are not too many and I don't expect that loadLoadables
will have many new options in the future).
dcc1fbb
to
e1d49fc
Compare
e1d49fc
to
f00de81
Compare
Alright, I explicitly specified the arguments. I realized that the main time consumer (~80%) in most of my cases is actually the function |
Nitpick: Adding type annotation would be nice as well though this is outside of the immediate scope of this pull request |
I don't see a single type hint in this entire module so far (even in the entire |
We indeed only recently started to introduce them in new code. For example: In this case, adding annotation for Footnotes |
@@ -22,7 +22,7 @@ | |||
|
|||
|
|||
# ------------------------------------------------------------------------------ | |||
def loadPatientByUID(patientUID): | |||
def loadPatientByUID(patientUID, messages=None, progressCallback=None): |
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.
def loadPatientByUID(patientUID, messages=None, progressCallback=None): | |
def loadPatientByUID(patientUID, messages: Optional[list[str]]=None, progressCallback=None): |
You also need to add the following at the top:
from typing import Optional
Integrating. Annotation type will be introduced later. |
main
by force pushing. Corresponding changes are superseded by #7330Rational:
Would be great to have the progressbar option of
loadSeriesByUID
also for the higher level functions.