diff options
author | Philipp Hahn <hahn@univention.de> | 2020-04-26 20:13:22 +0200 |
---|---|---|
committer | Jano Tomko <jtomko@redhat.com> | 2020-09-01 13:26:01 +0000 |
commit | 22bfd4bcab26ab3a98a02b4c0962edd650321cf5 (patch) | |
tree | 6bee2ca327280a97df5abdaa8617829d9497354b /generator.py | |
parent | d30d87225123f3ae86b7d968f75e6acb708f6cbd (diff) | |
download | libvirt-python-22bfd4bcab26ab3a98a02b4c0962edd650321cf5.tar.gz |
generator: Work around type changev6.8.0
a variable should not change its type.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'generator.py')
-rwxr-xr-x | generator.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/generator.py b/generator.py index 2366416..3eb997f 100755 --- a/generator.py +++ b/generator.py @@ -1689,10 +1689,9 @@ def buildWrappers(module: str) -> None: # # Generate enum constants # - def enumsSortKey(data): - value = data[1] + def enumsSortKey(data: Tuple[str, EnumValue]) -> Tuple[Union[int, float], str]: try: - value = int(value) + value = int(data[1]) # type: Union[int, float] except ValueError: value = float('inf') return value, data[0] |