aboutsummaryrefslogtreecommitdiff
path: root/scripts/clean-header-guards.pl
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2024-03-15 16:22:45 +0100
committerMarkus Armbruster <armbru@redhat.com>2024-04-24 10:03:54 +0200
commit9bda6c7d1108c13be67e615b50f5d1b61fa3177e (patch)
tree29ed09325e822958903ff1a54f87ffba3fb90835 /scripts/clean-header-guards.pl
parentd150be3d54e4df04948b7205f7ccdde5a84f0684 (diff)
qapi/schema: adjust type narrowing for mypy's benefit
We already take care to perform some type narrowing for arg_type and ret_type, but not in a way where mypy can utilize the result once we add type hints, e.g.: qapi/schema.py:833: error: Incompatible types in assignment (expression has type "QAPISchemaType", variable has type "Optional[QAPISchemaObjectType]") [assignment] qapi/schema.py:893: error: Incompatible types in assignment (expression has type "QAPISchemaType", variable has type "Optional[QAPISchemaObjectType]") [assignment] A simple change to use a temporary variable helps the medicine go down. 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-10-armbru@redhat.com>
Diffstat (limited to 'scripts/clean-header-guards.pl')
0 files changed, 0 insertions, 0 deletions