-
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
Update Mypy to 1.11.2 and fix new signature override errors #18811
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tasetAssociation` class See galaxyproject#18773 (review)
Fix the following mypy 1.11 error: ``` lib/galaxy/managers/history_contents.py:638: error: Signature of "_add_parsers" incompatible with supertype "GenomeFilterMixin" [override] def _add_parsers(self): ^ lib/galaxy/managers/history_contents.py:638: note: Superclass: lib/galaxy/managers/history_contents.py:638: note: def _add_parsers(self, database_connection: str) -> Any lib/galaxy/managers/history_contents.py:638: note: Subclass: lib/galaxy/managers/history_contents.py:638: note: def _add_parsers(self) -> Any ```
…method Fix the following mypy 1.11 errors: ``` lib/galaxy/managers/hdas.py:616: error: Signature of "serialize" incompatible with supertype "DatasetAssociationSerializer" [override] def serialize(self, hda, keys, user=None, **context): ^ lib/galaxy/managers/hdas.py:616: note: Superclass: lib/galaxy/managers/hdas.py:616: note: def serialize(self, item: Any, keys: Any, **context: Any) -> Any lib/galaxy/managers/hdas.py:616: note: Subclass: lib/galaxy/managers/hdas.py:616: note: def serialize(self, hda: Any, keys: Any, user: Any = ..., **context: Any) -> Any lib/galaxy/managers/hdas.py:616: error: Signature of "serialize" incompatible with supertype "ModelSerializer" [override] def serialize(self, hda, keys, user=None, **context): ^ lib/galaxy/managers/hdas.py:616: note: Superclass: lib/galaxy/managers/hdas.py:616: note: def serialize(self, item: Any, keys: Any, **context: Any) -> Any lib/galaxy/managers/hdas.py:616: note: Subclass: lib/galaxy/managers/hdas.py:616: note: def serialize(self, hda: Any, keys: Any, user: Any = ..., **context: Any) -> Any ```
…ethod Fix the following mypy 1.11 errors: ``` lib/galaxy/tools/__init__.py:3989: error: Signature of "produce_outputs" incompatible with supertype "DatabaseOperationTool" [override] def produce_outputs(self, trans, out_data, output_collections, inc... ^ lib/galaxy/tools/__init__.py:3989: note: Superclass: lib/galaxy/tools/__init__.py:3989: note: def produce_outputs(self, trans: Any, out_data: Any, output_collections: Any, incoming: Any, history: Any, **kwds: Any) -> Any lib/galaxy/tools/__init__.py:3989: note: Subclass: lib/galaxy/tools/__init__.py:3989: note: def produce_outputs(self, trans: Any, out_data: Any, output_collections: Any, incoming: Any, history: Any, tag_handler: Any, **kwds: Any) -> Any lib/galaxy/tools/__init__.py:4026: error: Signature of "produce_outputs" incompatible with supertype "DatabaseOperationTool" [override] def produce_outputs(self, trans, out_data, output_collections, inc... ^ lib/galaxy/tools/__init__.py:4026: note: Superclass: lib/galaxy/tools/__init__.py:4026: note: def produce_outputs(self, trans: Any, out_data: Any, output_collections: Any, incoming: Any, history: Any, **kwds: Any) -> Any lib/galaxy/tools/__init__.py:4026: note: Subclass: lib/galaxy/tools/__init__.py:4026: note: def produce_outputs(self, trans: Any, out_data: Any, output_collections: Any, incoming: Any, history: Any, tag_handler: Any, **kwds: Any) -> Any ```
Fix the following mypy 1.11 errors: ``` lib/galaxy/workflow/modules.py:650: error: Signature of "save_to_step" incompatible with supertype "WorkflowModule" [override] def save_to_step(self, step, **kwd): ^ lib/galaxy/workflow/modules.py:650: note: Superclass: lib/galaxy/workflow/modules.py:650: note: def save_to_step(self, step: Any, detached: Any = ...) -> Any lib/galaxy/workflow/modules.py:650: note: Subclass: lib/galaxy/workflow/modules.py:650: note: def save_to_step(self, step: Any, **kwd: Any) -> Any lib/galaxy/workflow/modules.py:1030: error: Signature of "save_to_step" incompatible with supertype "WorkflowModule" [override] def save_to_step(self, step, **kwd): ^ lib/galaxy/workflow/modules.py:1030: note: Superclass: lib/galaxy/workflow/modules.py:1030: note: def save_to_step(self, step: Any, detached: Any = ...) -> Any lib/galaxy/workflow/modules.py:1030: note: Subclass: lib/galaxy/workflow/modules.py:1030: note: def save_to_step(self, step: Any, **kwd: Any) -> Any lib/galaxy/workflow/modules.py:1680: error: Signature of "save_to_step" incompatible with supertype "WorkflowModule" [override] def save_to_step(self, step, **kwd): ^ lib/galaxy/workflow/modules.py:1680: note: Superclass: lib/galaxy/workflow/modules.py:1680: note: def save_to_step(self, step: Any, detached: Any = ...) -> Any lib/galaxy/workflow/modules.py:1680: note: Subclass: lib/galaxy/workflow/modules.py:1680: note: def save_to_step(self, step: Any, **kwd: Any) -> Any ```
Fix the following mypy 1.11 error: ``` lib/galaxy/tools/__init__.py:3212: error: Signature of "exec_after_process" incompatible with supertype "Tool" [override] def exec_after_process(self, app, inp_data, out_data, param_dict, ... ^ lib/galaxy/tools/__init__.py:3212: note: Superclass: lib/galaxy/tools/__init__.py:3212: note: def exec_after_process(self, app: Any, inp_data: Any, out_data: Any, param_dict: Any, job: Any = ..., **kwds: Any) -> Any lib/galaxy/tools/__init__.py:3212: note: Subclass: lib/galaxy/tools/__init__.py:3212: note: def exec_after_process(self, app: Any, inp_data: Any, out_data: Any, param_dict: Any, job: Any, final_job_state: Any = ..., **kwds: Any) -> Any ``` Also: - Add some type annotions - Small refactorings
Remove now unneeded `type: ignore` .
nsoranzo
added
kind/bug
kind/refactoring
cleanup or refactoring of existing code, no functional changes
labels
Sep 13, 2024
github-actions
bot
added
area/jobs
area/workflows
area/database
Galaxy's database or data access layer
area/tool-framework
area/util
area/dependencies
labels
Sep 13, 2024
jmchilton
approved these changes
Sep 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/database
Galaxy's database or data access layer
area/dependencies
area/jobs
area/tool-framework
area/util
area/workflows
kind/bug
kind/refactoring
cleanup or refactoring of existing code, no functional changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extracted from #18578 , since it's going to be overwritten by the bot tomorrow.
How to test the changes?
(Select all options that apply)
License