Skip to content

Commit a02614c

Browse files
committed
Fix a mypy warning
1 parent a08c72a commit a02614c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mypyc/irbuild/classdef.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,9 @@ def create_ne_from_eq(builder: IRBuilder, cdef: ClassDef) -> None:
806806

807807
def gen_glue_ne_method(builder: IRBuilder, cls: ClassIR, line: int) -> None:
808808
"""Generate a "__ne__" method from a "__eq__" method."""
809-
eq_sig = cls.get_method("__eq__").decl.sig
809+
func_ir = cls.get_method("__eq__")
810+
assert func_ir
811+
eq_sig = func_ir.decl.sig
810812
strict_typing = builder.options.strict_dunders_typing
811813
with builder.enter_method(cls, "__ne__", eq_sig.ret_type):
812814
rhs_type = eq_sig.args[0].type if strict_typing else object_rprimitive

0 commit comments

Comments
 (0)