MCPcopy Index your code
hub / github.com/faust-streaming/faust / HashMethod

Function HashMethod

faust/utils/codegen.py:157–160  ·  view source on GitHub ↗

Generate ``__hash__`` method.

(attrs: List[str], **kwargs: Any)

Source from the content-addressed store, hash-verified

155
156
157def HashMethod(attrs: List[str], **kwargs: Any) -> Callable[[], None]:
158 """Generate ``__hash__`` method."""
159 self_tuple = obj_attrs_tuple("self", attrs)
160 return Method("__hash__", [], [f"return hash({self_tuple})"], **kwargs)
161
162
163def EqMethod(fields: List[str], **kwargs: Any) -> Callable[[], None]:

Callers

nothing calls this directly

Calls 2

obj_attrs_tupleFunction · 0.85
MethodFunction · 0.85

Tested by

no test coverage detected