File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
tests/stubs/expected/cpp_library_bindings/_core/opaque_types Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -479,6 +479,10 @@ def is_safe_to_use_repr(self, value):
479479 return False
480480
481481 def to_lines (self ): # type: () -> List[str]
482+ # special case for __hash__ to mark the surrounding class as unhashable
483+ if self .name == "__hash__" and self .attr is None :
484+ return ["__hash__: typing.ClassVar[None] = None" ]
485+
482486 if self .is_safe_to_use_repr (self .attr ):
483487 return ["{name} = {repr}" .format (name = self .name , repr = repr (self .attr ))]
484488
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ class VectorPairStringDouble:
118118 """
119119 Remove the first item from the list whose value is x. It is an error if there is no such item.
120120 """
121- __hash__ = None
121+ __hash__ : typing . ClassVar [ None ] = None
122122 pass
123123
124124def get_complex_map () -> MapStringComplex :
You can’t perform that action at this time.
0 commit comments