tf.compat.v1.flags.EnumClassParser

Parser of an Enum class member.

Inherits From: ArgumentParser

enum_class class, the Enum class with all possible flag values.

TypeError When enum_class is not a subclass of Enum.
ValueError When enum_class is empty.

Methods

flag_type

See base class.

parse

Determines validity of argument and returns the correct element of enum.

Args
argument str or Enum class member, the supplied flag value.

Returns
The first matching Enum class member in Enum class.

Raises
ValueError Raised when argument didn't match anything in enum.

Class Variables

  • syntactic_help = ''