Skip to content

Commit

Permalink
MAINT Remove a couple type: ignore directives
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodmane committed Sep 23, 2023
1 parent 1ca937b commit 048e988
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sphinx_js/typedoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 048e988

Please sign in to comment.