From 048e98868b70207a9218ba024536b3bf76971ace Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 22 Sep 2023 18:37:39 -0700 Subject: [PATCH] MAINT Remove a couple type: ignore directives --- sphinx_js/typedoc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sphinx_js/typedoc.py b/sphinx_js/typedoc.py index 0156ef27..7932a227 100644 --- a/sphinx_js/typedoc.py +++ b/sphinx_js/typedoc.py @@ -412,11 +412,14 @@ class Accessor(NodeBase): def to_ir(self, converter: Converter) -> tuple[ir.Attribute, Sequence["Node"]]: if self.getSignature: # There's no signature to speak of for a getter: only a return type. - type = self.getSignature.type # type: ignore[union-attr] + assert isinstance(self.getSignature, Signature) + type = self.getSignature.type else: # ES6 says setters have exactly 1 param. I'm not sure if they # can have multiple signatures, though. - type = self.setSignature.parameters[0].type # type: ignore[union-attr] + assert isinstance(self.setSignature, Signature) + type = self.setSignature.parameters[0].type + res = ir.Attribute( type=type.render_name(converter), **self.member_properties(),