From 3a454baac3a420476ad78dde945b5a7b83265295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Frenot?= Date: Tue, 29 Oct 2024 16:13:07 +0000 Subject: [PATCH] fixed pyright --- xdsl/dialects/llvm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xdsl/dialects/llvm.py b/xdsl/dialects/llvm.py index 36c28fb70c..1118140240 100644 --- a/xdsl/dialects/llvm.py +++ b/xdsl/dialects/llvm.py @@ -56,6 +56,7 @@ from xdsl.traits import IsTerminator, NoMemoryEffect, SymbolOpInterface from xdsl.utils.exceptions import VerifyException from xdsl.utils.hints import isa +from xdsl.utils.isattr import isattr from xdsl.utils.str_enum import StrEnum GEP_USE_SSA_VAL = -2147483648 @@ -1332,7 +1333,7 @@ def parse(cls, parser: Parser): def print(self, printer: Printer) -> None: printer.print("(") - if isinstance(self.value, IntegerAttr) and self.result.type == IntegerType(64): + if isattr(self.value, AnyIntegerAttr) and self.result.type == IntegerType(64): self.value.print_without_type(printer) else: printer.print(self.value)