]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qapi/gen: Drop support for QAPIGen without a file name
authorMarkus Armbruster <armbru@redhat.com>
Mon, 1 Feb 2021 19:37:45 +0000 (14:37 -0500)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 8 Feb 2021 13:15:58 +0000 (14:15 +0100)
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>
Message-Id: <20210201193747.2169670-15-jsnow@redhat.com>

scripts/qapi/gen.py

index a0a5df333e00b9ed0d426865562c91c18b1ac181..ac3d3e687ef0696018ef917708c921da3cfb1b69 100644 (file)
@@ -40,7 +40,7 @@ from .source import QAPISourceInfo
 
 
 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