@@ -323,7 +323,9 @@ def attr_class_maker_callback(
323
323
frozen = _get_frozen (ctx , frozen_default )
324
324
order = _determine_eq_order (ctx )
325
325
slots = _get_decorator_bool_argument (ctx , "slots" , slots_default )
326
- hashable = _get_decorator_bool_argument (ctx , "hash" , False ) or _get_decorator_bool_argument (ctx , "unsafe_hash" , False )
326
+ hashable = _get_decorator_bool_argument (ctx , "hash" , False ) or _get_decorator_bool_argument (
327
+ ctx , "unsafe_hash" , False
328
+ )
327
329
328
330
auto_attribs = _get_decorator_optional_bool_argument (ctx , "auto_attribs" , auto_attribs_default )
329
331
kw_only = _get_decorator_bool_argument (ctx , "kw_only" , False )
@@ -948,9 +950,13 @@ def _add_match_args(ctx: mypy.plugin.ClassDefContext, attributes: list[Attribute
948
950
)
949
951
add_attribute_to_class (api = ctx .api , cls = ctx .cls , name = "__match_args__" , typ = match_args )
950
952
953
+
951
954
def _remove_hashability (ctx : mypy .plugin .ClassDefContext ) -> None :
952
955
"""Remove hashability from a class."""
953
- add_attribute_to_class (ctx .api , ctx .cls , "__hash__" , NoneType (), is_classvar = True , overwrite_existing = True )
956
+ add_attribute_to_class (
957
+ ctx .api , ctx .cls , "__hash__" , NoneType (), is_classvar = True , overwrite_existing = True
958
+ )
959
+
954
960
955
961
class MethodAdder :
956
962
"""Helper to add methods to a TypeInfo.
0 commit comments