Skip to main content

coerce

Method
This is a method of the StopScope class in the protocols module.
Best-effort parse of an external scope value. Accepts a StopScope, its string value (case-insensitively), or a boolean/None stop_cancels_pending style flag. Unknown values fall back to default (TURN when unset) so a malformed scope never escalates a stop beyond the caller’s intent.

Signature

Parameters

Any
required
No description available.
StopScope
No description available.

Returns

'StopScope'
The result of the operation.

Uses

  • cls

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 7321