Skip to content

Commit

Permalink
Allow flow_volinfos in ReconcileAndFilterFlows.Config to be unspeci…
Browse files Browse the repository at this point in the history
…fied.

PiperOrigin-RevId: 696215418
  • Loading branch information
timblakely authored and copybara-github committed Nov 26, 2024
1 parent d198280 commit 63cd8bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion processor/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ class Config(utils.NPDataClassJsonMixin):

_config: Config
_metadata: list[metadata.VolumeMetadata] = []
_scales: list[float | None] = []

def __init__(
self,
Expand All @@ -343,15 +344,17 @@ def __init__(
"""
self._config = config

self._scales = [None]
if input_path_or_metadata is not None:
meta = input_path_or_metadata
if not isinstance(meta, metadata.VolumeMetadata):
meta = self._get_metadata(meta)
self._scales.append(None)
self._metadata.append(meta)
if isinstance(config.flow_volinfos, str):
config.flow_volinfos = config.flow_volinfos.split(',')

if config.flow_volinfos is None:
config.flow_volinfos = []
for path in config.flow_volinfos:
path, _, scale = path.partition(':')
if scale:
Expand Down

0 comments on commit 63cd8bf

Please sign in to comment.