[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 15/17] qapi/gen: Drop support for QAPIGen without a file name
From: |
John Snow |
Subject: |
[PATCH v3 15/17] qapi/gen: Drop support for QAPIGen without a file name |
Date: |
Tue, 19 Jan 2021 13:02:40 -0500 |
From: Markus Armbruster <armbru@redhat.com>
The previous commit removed the only user of QAPIGen(None). Tighten
the type hint.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
scripts/qapi/gen.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index 86abdabb57a..87074335e6c 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -40,7 +40,7 @@
class QAPIGen:
- def __init__(self, fname: Optional[str]):
+ def __init__(self, fname: str):
self.fname = fname
self._preamble = ''
self._body = ''
@@ -125,7 +125,7 @@ def build_params(arg_type: Optional[QAPISchemaObjectType],
class QAPIGenCCode(QAPIGen):
- def __init__(self, fname: Optional[str]):
+ def __init__(self, fname: str):
super().__init__(fname)
self._start_if: Optional[Tuple[List[str], str, str]] = None
--
2.26.2
- [PATCH v3 07/17] qapi/gen: Replace ._begin_system_module(), (continued)
- [PATCH v3 07/17] qapi/gen: Replace ._begin_system_module(), John Snow, 2021/01/19
- [PATCH v3 11/17] qapi: centralize the built-in module name definition, John Snow, 2021/01/19
- [PATCH v3 04/17] qapi/gen: inline _wrap_ifcond into end_if(), John Snow, 2021/01/19
- [PATCH v3 12/17] qapi/gen: write _genc/_genh access shims, John Snow, 2021/01/19
- [PATCH v3 16/17] qapi: type 'info' as Optional[QAPISourceInfo], John Snow, 2021/01/19
- [PATCH v3 10/17] qapi/gen: Combine ._add_[user|system]_module, John Snow, 2021/01/19
- [PATCH v3 02/17] qapi/events: fix visit_event typing, John Snow, 2021/01/19
- [PATCH v3 09/17] qapi: use './builtin' as the built-in module name, John Snow, 2021/01/19
- [PATCH v3 15/17] qapi/gen: Drop support for QAPIGen without a file name,
John Snow <=
- [PATCH v3 13/17] qapi/gen: Support for switching to another module temporarily, John Snow, 2021/01/19
- [PATCH v3 14/17] qapi/commands: Simplify command registry generation, John Snow, 2021/01/19
- [PATCH v3 17/17] qapi: enable strict-optional checks, John Snow, 2021/01/19