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

Convert to more specific return types in DICOMwebClient #20

Closed
ntenenz opened this issue Jan 7, 2020 · 2 comments
Closed

Convert to more specific return types in DICOMwebClient #20

ntenenz opened this issue Jan 7, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@ntenenz
Copy link
Contributor

ntenenz commented Jan 7, 2020

While it's common practice to accept Sequence[T] when a function can accept a list, tuple, etc., it's often best to be more specific with return types allowing those invoking the methods to have greater clarity of the type returned. In many of DICOMwebClient's methods, current type hints provide a return value of Sequence[T] where List[T] would be more specific. I propose updating these types to the more specific values provided the API is comfortable committing to these types (which seems like a fairly innocuous commitment).

@hackermd hackermd self-assigned this Jan 7, 2020
@hackermd hackermd added the enhancement New feature or request label Jan 7, 2020
@hackermd
Copy link
Collaborator

hackermd commented Jan 7, 2020

Good point. List[T is also what the corresponding docstrings say.

@hackermd hackermd closed this as completed Jan 7, 2020
@hackermd
Copy link
Collaborator

hackermd commented Jan 7, 2020

Merged into master branch. Will be included in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants