From 6632f364ffbd5ccb086b93dd4f6f40f0b3fabba8 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Thu, 29 Apr 2021 09:27:41 +0200 Subject: [PATCH] added python type hint stub --- pyfan.pyi | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pyfan.pyi diff --git a/pyfan.pyi b/pyfan.pyi new file mode 100644 index 0000000..0e25e77 --- /dev/null +++ b/pyfan.pyi @@ -0,0 +1,54 @@ +from typing import Any, Pattern + +from simple_pid import PID + +SYSFS_HWMON_BASE: str + + +class ThermalZone: + fans: Any = ... + temp_source: Any = ... + pid: PID = ... + factor: float = ... + name: str = ... + target: Any = ... + hwmap: dict = ... + pyfan: PyFan = ... + alias_replace: Pattern = ... + + def __init__(self, config: dict, pyfan_parent: PyFan) -> None: ... + + def eval(self) -> None: ... + + def get_temp(self): ... + + def restore(self) -> None: ... + + def setup_pwm(self, value: int = ...) -> None: ... + + def replace_alias(self, path: str): ... + + def build_pwm_path(self, specific: Any): ... + + def write_sysfs(self, path: str, value: Any) -> None: ... + + def read_sysfs(self, path: str): ... + + def set_pwm_mode(self, path: str, value: int = ...) -> None: ... + + +class PyFan: + config: dict = ... + zones: list = ... + interval: float = ... + + def __init__(self, config: str = ...) -> None: ... + + def __enter__(self): ... + + def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: ... + + def eval(self) -> None: ... + + @property + def hwmap(self): ...