Skip to content

Commit

Permalink
partial fireworks revert
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Apr 26, 2024
1 parent 711d4ac commit bdc2bb4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions fireworks/core/firework.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ def __init__(
not only to direct children, but to all dependent FireWorks
down to the Workflow's leaves.
"""
mod_spec = mod_spec or []
additions = additions or []
detours = detours or []
mod_spec = mod_spec if mod_spec is not None else []
additions = additions if additions is not None else []
detours = detours if detours is not None else []

self.stored_data = stored_data or {}
self.stored_data = stored_data if stored_data else {}
self.exit = exit
self.update_spec = update_spec or {}
self.update_spec = update_spec if update_spec else {}
self.mod_spec = mod_spec if isinstance(mod_spec, (list, tuple)) else [mod_spec]
self.additions = additions if isinstance(additions, (list, tuple)) else [additions]
self.detours = detours if isinstance(detours, (list, tuple)) else [detours]
Expand Down Expand Up @@ -267,13 +267,13 @@ def __init__(
NEGATIVE_FWID_CTR -= 1
self.fw_id = NEGATIVE_FWID_CTR

self.launches = launches or []
self.archived_launches = archived_launches or []
self.launches = launches if launches else []
self.archived_launches = archived_launches if archived_launches else []
self.created_on = created_on or datetime.utcnow()
self.updated_on = updated_on or datetime.utcnow()

parents = [parents] if isinstance(parents, Firework) else parents
self.parents = parents or []
self.parents = parents if parents else []

self._state = state

Expand Down Expand Up @@ -476,9 +476,9 @@ def __init__(
self.fworker = fworker or FWorker()
self.host = host or get_my_host()
self.ip = ip or get_my_ip()
self.trackers = trackers or []
self.action = action or None
self.state_history = state_history or []
self.trackers = trackers if trackers else []
self.action = action if action else None
self.state_history = state_history if state_history else []
self.state = state
self.launch_id = launch_id
self.fw_id = fw_id
Expand Down

0 comments on commit bdc2bb4

Please sign in to comment.