MCPcopy Create free account
hub / github.com/PyTables/PyTables / get_cmp

Function get_cmp

tables/conditions.py:110–124  ·  view source on GitHub ↗
(
        var: ne.expressions.ExpressionNode,
        const: ne.expressions.ExpressionNode,
        op: str,
    )

Source from the content-addressed store, hash-verified

108 }
109
110 def get_cmp(
111 var: ne.expressions.ExpressionNode,
112 const: ne.expressions.ExpressionNode,
113 op: str,
114 ) -> tuple[Any, str, Any] | None:
115 var_value, const_value = var.value, const.value
116 if (
117 var.astType == "variable"
118 and var_value in indexedcols
119 and const.astType in ["constant", "variable"]
120 ):
121 if const.astType == "variable":
122 const_value = (const_value,)
123 return (var_value, op, const_value)
124 return None
125
126 def is_indexed_boolean(node: ne.expressions.ExpressionNode) -> bool:
127 return (

Callers 1

_get_indexable_cmpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected