deepvariant/testing/flagsaver.py
def FlagContext(**overrides):
  """Context manager that saves flag values on entry and restores them on exit.

  Args:
    **overrides: Set these flag values while within the context manager.

  Yields:
    Nothing, it's a context manager.
  """
  saved_flag_values = SaveFlagValues()
  for name, value in overrides.items():
    setattr(FLAGS, name, value)
  try:
    yield
  finally:
    RestoreFlagValues(saved_flag_values)
Context manager that saves flag values on entry and restores them on exit.

  Args:
    **overrides: Set these flag values while within the context manager.

  Yields:
    Nothing, it's a context manager.
  
Context manager that saves flag values on entry and restores them on exit.
Context manager that saves flag values on entry and restores them on exit .
def FlagContext(**overrides):
  saved_flag_values = SaveFlagValues()
  for name, value in overrides.items():
    setattr(FLAGS, name, value)
  try:
    yield
  finally:
    RestoreFlagValues(saved_flag_values)
def FlagContext ( ** overrides ) : saved_flag_values = SaveFlagValues ( ) for name , value in overrides . items ( ) : setattr ( FLAGS , name , value ) try : yield finally : RestoreFlagValues ( saved_flag_values )
Context manager that saves flag values on entry and restores them on exit.
Context manager that saves flag values on entry and restores them on exit .
"""Context manager that saves flag values on entry and restores them on exit.

  Args:
    **overrides: Set these flag values while within the context manager.

  Yields:
    Nothing, it's a context manager.
  """
Nothing, it's a context manager.
Nothing it ' s a context manager .
**overrides
Set these flag values while within the context manager.
Set these flag values while within the context manager .