IsLocalDict#

class langchain_core.runnables.utils.IsLocalDict(name: str, keys: set[str])[source]#

Check if a name is a local dict.

Initialize the visitor.

Parameters:
  • name (str) – The name to check.

  • keys (set[str]) – The keys to populate.

Methods

__init__(name, keys)

Initialize the visitor.

generic_visit(node)

Called if no explicit visitor function exists for a node.

visit(node)

Visit a node.

visit_Call(node)

Visit a call node.

visit_Constant(node)

visit_Subscript(node)

Visit a subscript node.

__init__(name: str, keys: set[str]) → None[source]#

Initialize the visitor.

Parameters:
  • name (str) – The name to check.

  • keys (set[str]) – The keys to populate.

Return type:

None

generic_visit(node)#

Called if no explicit visitor function exists for a node.

visit(node)#

Visit a node.

visit_Call(node: Call) → Any[source]#

Visit a call node.

Parameters:

node (Call) – The node to visit.

Returns:

The result of the visit.

Return type:

Any

visit_Constant(node)#
visit_Subscript(node: Subscript) → Any[source]#

Visit a subscript node.

Parameters:

node (Subscript) – The node to visit.

Returns:

The result of the visit.

Return type:

Any