-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Type updates #12868
Type updates #12868
Conversation
fb42185
to
dae7318
Compare
disallow_untyped_decorators = True | ||
no_implicit_optional = True | ||
warn_unused_ignores = True | ||
warn_return_any = True |
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.
If warn_return_any = True
is specified under [mypy-galaxy.tools.wrappers]
then tox -e test_galaxy_packages
fails
mypy galaxy tests
galaxy/tools/wrappers.py:262: error: Returning Any from function declared to return "Iterator[Any]"
galaxy/tools/wrappers.py:265: error: Returning Any from function declared to return "bool"
galaxy/tools/wrappers.py:346: error: Returning Any from function declared to return "List[Tuple[str, str]]"
galaxy/tools/wrappers.py:365: error: Returning Any from function declared to return "bool"
galaxy/tools/wrappers.py:573: error: Returning Any from function declared to return "List[List[Any]]"
but tox -e py36-mypy
passes
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 all the type annotations! I learned a couple of things from it :)
bdc5fc8
to
14df18a
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.
Very cool!
lib/galaxy/workflow/run.py:333: error: Item "DatasetCollection" of "Union[HistoryDatasetCollectionAssociation, DatasetCollection]" has no attribute "collection"
The code wouldn't currently work if `replacement` is a `DatasetCollection` because it tries to access the `collection` attribute which is available only for `HistoryDatasetCollectionAssociation`.
Why: common-workflow-lab#137
What: Improved type hints
How to test the changes?
(Select all options that apply)
License