MCPcopy
hub / github.com/tanelpoder/0xtools / _normalize_values

Method _normalize_values

xtop/core/navigation.py:179–187  ·  view source on GitHub ↗

Ensure filter values are stored as lists.

(values: Any)

Source from the content-addressed store, hash-verified

177
178 @staticmethod
179 def _normalize_values(values: Any) -> List[Any]:
180 """Ensure filter values are stored as lists."""
181 if values is None:
182 return []
183 if isinstance(values, list):
184 return list(values)
185 if isinstance(values, (tuple, set)):
186 return list(values)
187 return [values]
188
189 @staticmethod
190 def _format_value(value: Any) -> str:

Callers 3

drill_downMethod · 0.95
add_filterMethod · 0.95
apply_value_filtersMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected