MCPcopy Create free account
hub / github.com/binance/binance-connector-python / validate_time_unit

Function validate_time_unit

common/src/binance_common/utils.py:232–247  ·  view source on GitHub ↗

Validates the time unit against the defined TimeUnit constants. :param time_unit: The time unit to validate. :return: The validated time unit if valid, or None if time_unit is None. :raises ValueError: If the time unit is not valid.

(time_unit: Optional[str])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

test_valid_time_unitsMethod · 0.90
test_none_time_unitMethod · 0.90

Calls

no outgoing calls

Tested by 3

test_valid_time_unitsMethod · 0.72
test_none_time_unitMethod · 0.72