refactor: add no return typings (#433)

Fixes type checking (false unbound variables), for the fail json helper
function that never returns (system exit).
This commit is contained in:
Jonas L 2023-12-21 17:44:42 +01:00 committed by GitHub
parent b7beb0971f
commit 4cbf9a2838
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@
from __future__ import annotations
import traceback
from typing import Any
from typing import Any, NoReturn
from ansible.module_utils.basic import AnsibleModule as AnsibleModuleBase, env_fallback
from ansible.module_utils.common.text.converters import to_native
@ -47,7 +47,7 @@ class AnsibleHCloud:
msg: str | None = None,
params: Any = None,
**kwargs,
) -> None:
) -> NoReturn:
last_traceback = traceback.format_exc()
failure = {}