mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
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:
parent
b7beb0971f
commit
4cbf9a2838
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import traceback
|
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.basic import AnsibleModule as AnsibleModuleBase, env_fallback
|
||||||
from ansible.module_utils.common.text.converters import to_native
|
from ansible.module_utils.common.text.converters import to_native
|
||||||
|
@ -47,7 +47,7 @@ class AnsibleHCloud:
|
||||||
msg: str | None = None,
|
msg: str | None = None,
|
||||||
params: Any = None,
|
params: Any = None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> None:
|
) -> NoReturn:
|
||||||
last_traceback = traceback.format_exc()
|
last_traceback = traceback.format_exc()
|
||||||
|
|
||||||
failure = {}
|
failure = {}
|
||||||
|
|
Loading…
Reference in a new issue