Skip to content
Open

TBD. #580

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions fiddle/_src/absl_flags/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def __init__(
# Due to the lazy evaluation of `value`, this list is needed to keep
# track of the remaining `directives`.
self._remaining_directives = []
# Save all arguments if needed for forwarding.
self._all_arguments = []
super().__init__(*args, **kwargs)

def _initial_config(self, expression: str):
Expand Down Expand Up @@ -176,6 +178,7 @@ def _apply_fiddler(self, cfg: config.Buildable, expression: str):
return new_cfg if new_cfg is not None else cfg

def parse(self, arguments):
self._all_arguments.append(arguments)
new_parsed = self._parse(arguments)
self._remaining_directives.extend(new_parsed)
self.present += len(new_parsed)
Expand Down Expand Up @@ -259,6 +262,10 @@ def value(self):
def value(self, value):
self._value = value

@property
def all_arguments(self):
return self._all_arguments


def DEFINE_fiddle_config( # pylint: disable=invalid-name
name: str,
Expand Down