qapi/schema: fix QAPISchemaArrayType.check's call to resolve_type
authorJohn Snow <jsnow@redhat.com>
Fri, 15 Mar 2024 15:22:49 +0000 (16:22 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 24 Apr 2024 08:03:54 +0000 (10:03 +0200)
commit8c91329ff09cec94dac22b459cc9914a7f49c54a
tree6f473b3d1e6b9fff95342e25b26803248a01cbd4
parent7191400a44c4eef49d2af356e0744bfb5d273046
qapi/schema: fix QAPISchemaArrayType.check's call to resolve_type

Adjust the expression at the callsite to work around mypy's weak type
introspection that believes this expression can resolve to
QAPISourceInfo; it cannot.

(Fundamentally: self.info only resolves to false in a boolean expression
when it is None; therefore this expression may only ever produce
Optional[str]. mypy does not know that 'info', when it is a
QAPISourceInfo object, cannot ever be false.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240315152301.3621858-14-armbru@redhat.com>
scripts/qapi/schema.py