diff options
author | Markus Armbruster | 2021-02-01 20:37:45 +0100 |
---|---|---|
committer | Markus Armbruster | 2021-02-08 14:15:58 +0100 |
commit | cc0747f6b709c197b077cd313f37617fc80c3be1 (patch) | |
tree | 1b4185806db389903e9651f54055d11b4398e1e8 /scripts/qapi/gen.py | |
parent | qapi/commands: Simplify command registry generation (diff) | |
download | qemu-cc0747f6b709c197b077cd313f37617fc80c3be1.tar.gz qemu-cc0747f6b709c197b077cd313f37617fc80c3be1.tar.xz qemu-cc0747f6b709c197b077cd313f37617fc80c3be1.zip |
qapi/gen: Drop support for QAPIGen without a file name
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>
Diffstat (limited to 'scripts/qapi/gen.py')
-rw-r--r-- | scripts/qapi/gen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index a0a5df333e..ac3d3e687e 100644 --- a/scripts/qapi/gen.py +++ b/scripts/qapi/gen.py @@ -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 |