Skip to content

Commit

Permalink
Even more typing
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c authored and nsoranzo committed Nov 26, 2022
1 parent 8441e7d commit 13642bc
Show file tree
Hide file tree
Showing 13 changed files with 499 additions and 235 deletions.
12 changes: 6 additions & 6 deletions lib/galaxy/managers/model_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def import_model_store(self, request: ImportModelStoreTaskRequest):
import_options,
model_store_format=request.model_store_format,
)
new_history = history is None and not request.for_library
if new_history:
create_new_history = history is None and not request.for_library
if create_new_history:
if not model_import_store.defines_new_history():
raise RequestParameterInvalidException("Supplied model store doesn't define new history to import.")
with model_import_store.target_history(legacy_history_naming=False) as new_history:
Expand All @@ -197,7 +197,7 @@ def import_model_store(self, request: ImportModelStoreTaskRequest):
else:
object_tracker = model_import_store.perform_import(
history=history,
new_history=new_history,
new_history=create_new_history,
)
return object_tracker

Expand All @@ -220,8 +220,8 @@ def create_objects_from_store(
import_options=import_options,
model_store_format=payload.model_store_format,
)
new_history = history is None and not for_library
if new_history:
create_new_history = history is None and not for_library
if create_new_history:
if not model_import_store.defines_new_history():
raise RequestParameterInvalidException("Supplied model store doesn't define new history to import.")
with model_import_store.target_history(legacy_history_naming=False) as new_history:
Expand All @@ -230,6 +230,6 @@ def create_objects_from_store(
else:
object_tracker = model_import_store.perform_import(
history=history,
new_history=new_history,
new_history=create_new_history,
)
return object_tracker
1 change: 1 addition & 0 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3823,6 +3823,7 @@ class DatasetInstance(UsesCreateAndUpdateTime, _HasTable):
conversion_messages = Dataset.conversion_messages
permitted_actions = Dataset.permitted_actions
purged: bool
creating_job_associations: List[Union[JobToOutputDatasetCollectionAssociation, JobToOutputDatasetAssociation]]

class validated_states(str, Enum):
UNKNOWN = "unknown"
Expand Down
Loading

0 comments on commit 13642bc

Please sign in to comment.