sweep_artifacts: narrow the optional flow store for mypy
This commit is contained in:
@@ -403,14 +403,15 @@ def sweep_artifacts(
|
|||||||
return 0
|
return 0
|
||||||
keep = set(session.exec(select(col(RunArtifact.digest)).distinct()).all())
|
keep = set(session.exec(select(col(RunArtifact.digest)).distinct()).all())
|
||||||
|
|
||||||
for name in flows.list_flows() if flows else ():
|
if flows is not None:
|
||||||
for draft in (False, True):
|
for name in flows.list_flows():
|
||||||
try:
|
for draft in (False, True):
|
||||||
flow = flows.read_flow(name, draft=draft)
|
try:
|
||||||
except FlowNotFound:
|
flow = flows.read_flow(name, draft=draft)
|
||||||
continue
|
except FlowNotFound:
|
||||||
for declared in flow.inputs:
|
continue
|
||||||
_references_in(declared.initial, keep)
|
for declared in flow.inputs:
|
||||||
|
_references_in(declared.initial, keep)
|
||||||
|
|
||||||
keys = state.keys()
|
keys = state.keys()
|
||||||
for start in range(0, len(keys), _SWEEP_BATCH):
|
for start in range(0, len(keys), _SWEEP_BATCH):
|
||||||
|
|||||||
Reference in New Issue
Block a user