mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 11:29:46 +00:00
Generics and other type hint improvements (#45250)
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
"""Util to handle processes."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import subprocess
|
||||
from typing import Any
|
||||
|
||||
# mypy: disallow-any-generics
|
||||
|
||||
|
||||
def kill_subprocess(process: subprocess.Popen) -> None:
|
||||
def kill_subprocess(
|
||||
# pylint: disable=unsubscriptable-object # https://github.com/PyCQA/pylint/issues/4034
|
||||
process: subprocess.Popen[Any],
|
||||
) -> None:
|
||||
"""Force kill a subprocess and wait for it to exit."""
|
||||
process.kill()
|
||||
process.communicate()
|
||||
|
||||
Reference in New Issue
Block a user