[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 7b275c: qapi: Fix a botched type annotation
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 7b275c: qapi: Fix a botched type annotation |
Date: |
Mon, 13 Sep 2021 03:01:14 -0700 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 7b275cdd69d5e6af0b95f4e6440d4664fe1c3674
https://github.com/qemu/qemu/commit/7b275cdd69d5e6af0b95f4e6440d4664fe1c3674
Author: Markus Armbruster <armbru@redhat.com>
Date: 2021-09-08 (Wed, 08 Sep 2021)
Changed paths:
M scripts/qapi/common.py
Log Message:
-----------
qapi: Fix a botched type annotation
Mypy is unhappy:
$ mypy --config-file=scripts/qapi/mypy.ini `git-ls-files scripts/qapi/\*py`
scripts/qapi/common.py:208: error: Function is missing a return type
annotation
scripts/qapi/common.py:227: error: Returning Any from function declared to
return "str"
Messed up in commit ccea6a8637 "qapi: Factor common recursion out of
cgen_ifcond(), docgen_ifcond()". Tidy up.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210908045428.2689093-2-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Commit: 916fca17c7445c17d4be37610c80c1f68784ef28
https://github.com/qemu/qemu/commit/916fca17c7445c17d4be37610c80c1f68784ef28
Author: Markus Armbruster <armbru@redhat.com>
Date: 2021-09-08 (Wed, 08 Sep 2021)
Changed paths:
M scripts/qapi/common.py
Log Message:
-----------
qapi: Drop Indentation.__bool__()
Intentation.__bool__() is not worth its keep: it has just one user,
which can just as well check .__str__() instead.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210908045428.2689093-3-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Commit: e2ff14a5740c2fe3714a56221792b6d74bc64c08
https://github.com/qemu/qemu/commit/e2ff14a5740c2fe3714a56221792b6d74bc64c08
Author: Markus Armbruster <armbru@redhat.com>
Date: 2021-09-08 (Wed, 08 Sep 2021)
Changed paths:
M scripts/qapi/common.py
Log Message:
-----------
qapi: Bury some unused code in class Indentation
.__int__() has never been used. Drop it.
.decrease() raises ArithmeticError when asked to decrease indentation
level below zero. Nothing catches it. It's a programming error.
Dumb down to assert.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210908045428.2689093-4-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Commit: 71f03ef9f66b020d58acad5227e886102db41127
https://github.com/qemu/qemu/commit/71f03ef9f66b020d58acad5227e886102db41127
Author: Markus Armbruster <armbru@redhat.com>
Date: 2021-09-08 (Wed, 08 Sep 2021)
Changed paths:
A tests/qapi-schema/bad-if-not.err
A tests/qapi-schema/bad-if-not.json
A tests/qapi-schema/bad-if-not.out
M tests/qapi-schema/meson.build
Log Message:
-----------
tests/qapi-schema: Cover 'not' condition with empty argument
We flag this, but the error message is bogus:
bad-if-not.json:2: 'if' condition [] of struct is useless
The next commit will fix it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210908045428.2689093-5-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Commit: 62f27589f8549d6cf1f7fe21ed55ce6f2f705450
https://github.com/qemu/qemu/commit/62f27589f8549d6cf1f7fe21ed55ce6f2f705450
Author: Markus Armbruster <armbru@redhat.com>
Date: 2021-09-08 (Wed, 08 Sep 2021)
Changed paths:
M scripts/qapi/expr.py
M tests/qapi-schema/bad-if-not.err
Log Message:
-----------
qapi: Fix bogus error for 'if': { 'not': '' }
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210908045428.2689093-6-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[check_infix()'s type hint fixed]
Commit: eae587e8e3694b1aceab23239493fb4c7e1a80f5
https://github.com/qemu/qemu/commit/eae587e8e3694b1aceab23239493fb4c7e1a80f5
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-09-13 (Mon, 13 Sep 2021)
Changed paths:
M scripts/qapi/common.py
M scripts/qapi/expr.py
A tests/qapi-schema/bad-if-not.err
A tests/qapi-schema/bad-if-not.json
A tests/qapi-schema/bad-if-not.out
M tests/qapi-schema/meson.build
Log Message:
-----------
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-13' into
staging
QAPI patches patches for 2021-09-13
# gpg: Signature made Mon 13 Sep 2021 08:53:42 BST
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2021-09-13:
qapi: Fix bogus error for 'if': { 'not': '' }
tests/qapi-schema: Cover 'not' condition with empty argument
qapi: Bury some unused code in class Indentation
qapi: Drop Indentation.__bool__()
qapi: Fix a botched type annotation
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/cf6037ff37f6...eae587e8e369
- [Qemu-commits] [qemu/qemu] 7b275c: qapi: Fix a botched type annotation,
Peter Maydell <=