MCPcopy Index your code
hub / github.com/python/mypy / _remove_hashability

Function _remove_hashability

mypy/plugins/attrs.py:983–987  ·  view source on GitHub ↗

Remove hashability from a class.

(ctx: mypy.plugin.ClassDefContext)

Source from the content-addressed store, hash-verified

981
982
983def _remove_hashability(ctx: mypy.plugin.ClassDefContext) -> None:
984 """Remove hashability from a class."""
985 add_attribute_to_class(
986 ctx.api, ctx.cls, "__hash__", NoneType(), is_classvar=True, overwrite_existing=True
987 )
988
989
990class MethodAdder:

Callers 1

Calls 2

add_attribute_to_classFunction · 0.90
NoneTypeClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…