MCPcopy Create free account
hub / github.com/dot-agent/nextpy / format_props

Function format_props

nextpy/utils/format.py:377–392  ·  view source on GitHub ↗

Format the tag's props. Args: single_props: Props that are not key-value pairs. key_value_props: Props that are key-value pairs. Returns: The formatted props list.

(*single_props, **key_value_props)

Source from the content-addressed store, hash-verified

375
376
377def format_props(*single_props, **key_value_props) -> list[str]:
378 """Format the tag's props.
379
380 Args:
381 single_props: Props that are not key-value pairs.
382 key_value_props: Props that are key-value pairs.
383
384 Returns:
385 The formatted props list.
386 """
387 # Format all the props.
388 return [
389 f"{name}={format_prop(prop)}"
390 for name, prop in sorted(key_value_props.items())
391 if prop is not None
392 ] + [str(prop) for prop in single_props]
393
394
395def get_event_handler_parts(handler: EventHandler) -> tuple[str, str]:

Callers

nothing calls this directly

Calls 2

format_propFunction · 0.85
itemsMethod · 0.80

Tested by

no test coverage detected