grr/core/grr_response_core/stats/stats_utils.py
def MetricValueTypeFromPythonType(python_type):
  """Converts Python types to MetricMetadata.ValueType enum values."""
  if python_type in (int, long):
    return rdf_stats.MetricMetadata.ValueType.INT
  elif python_type == float:
    return rdf_stats.MetricMetadata.ValueType.FLOAT
  else:
    raise ValueError("Invalid value type: %s" % python_type)
Converts Python types to MetricMetadata.ValueType enum values.
Converts Python types to MetricMetadata.ValueType enum values.
Converts Python types to MetricMetadata . ValueType enum values .
def MetricValueTypeFromPythonType(python_type):
  if python_type in (int, long):
    return rdf_stats.MetricMetadata.ValueType.INT
  elif python_type == float:
    return rdf_stats.MetricMetadata.ValueType.FLOAT
  else:
    raise ValueError("Invalid value type: %s" % python_type)
def MetricValueTypeFromPythonType ( python_type ) : if python_type in ( int , long ) : return rdf_stats . MetricMetadata . ValueType . INT elif python_type == float : return rdf_stats . MetricMetadata . ValueType . FLOAT else : raise ValueError ( "Invalid value type: %s" % python_type )
Converts Python types to MetricMetadata.ValueType enum values.
Converts Python types to MetricMetadata . ValueType enum values .
"""Converts Python types to MetricMetadata.ValueType enum values."""
python_type