Skip to content

Commit

Permalink
Type hints, tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Aug 14, 2023
1 parent 6280e88 commit ca382da
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cylc/flow/id_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@


def filter_ids(
pool: 'List[Pool]',
pool: 'Pool',
ids: 'Iterable[str]',
*,
warn: 'bool' = True,
Expand Down
8 changes: 5 additions & 3 deletions cylc/flow/scripts/reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from functools import partial
from optparse import Values
from json import dumps
from typing import Dict

from cylc.flow.exceptions import InputError
from cylc.flow.network.client_factory import get_client
Expand All @@ -56,6 +57,7 @@
from cylc.flow.scripts.show import prereqs_and_outputs_query



MUTATION = '''
mutation (
$wFlows: [WorkflowID]!,
Expand Down Expand Up @@ -165,11 +167,11 @@ async def run(options: 'Values', workflow_id: str, *tokens_list) -> None:
# Print `cylc show` info as feedback to user.
# TODO: do this FIRST; the mutation may not (won't?) be done in time.
opts = Values()
json_filter = {}
json_filter: Dict = {}
opts.json = False
opts.list_prereqs = False

ret = await prereqs_and_outputs_query(
result = await prereqs_and_outputs_query(
workflow_id,
tokens_list,
pclient,
Expand All @@ -179,7 +181,7 @@ async def run(options: 'Values', workflow_id: str, *tokens_list) -> None:
if opts.json:
print(dumps(json_filter, indent=4))
else:
print(ret)
print(result)


@cli_function(get_option_parser)
Expand Down
3 changes: 0 additions & 3 deletions cylc/flow/task_events_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1651,9 +1651,6 @@ def reset_bad_hosts(self):

def spawn_children(self, itask, output):
# update DB task outputs
print(f">>>>>>>>>>>>>>>>>>>>>>. {itask}, {output}")
self.workflow_db_mgr.put_update_task_outputs(itask)
self.workflow_db_mgr.process_queued_ops()

# spawn child-tasks
self.spawn_func(itask, output)
2 changes: 1 addition & 1 deletion cylc/flow/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ def spawn_task(
name, point
)
)
return False
return None

itask = TaskProxy(
self.tokens,
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_id_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def _task_pool(pool, hier) -> 'Pool':
}

set_cycling_type(CYCLER_TYPE_INTEGER)
print(_task_pool, '<<<<<<<')
return _task_pool


Expand Down

0 comments on commit ca382da

Please sign in to comment.