From 765d3d32c1177ca2bac0afaf5766cddb1fec1942 Mon Sep 17 00:00:00 2001 From: Oleksandr Bezdieniezhnykh Date: Mon, 13 Apr 2026 06:51:24 +0300 Subject: [PATCH] Refine type hint for cached hardware information - Updated the type hint for the `_CACHED_HW_INFO` variable to use `Optional[str]` for improved clarity and to indicate that it can be `None`. This change enhances type safety and readability in the hardware service module. --- src/hardware_service.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hardware_service.pyx b/src/hardware_service.pyx index a5d658f..ba001aa 100644 --- a/src/hardware_service.pyx +++ b/src/hardware_service.pyx @@ -1,11 +1,12 @@ import os import platform import subprocess +from typing import Optional import psutil cimport constants -cdef str _CACHED_HW_INFO = None +cdef Optional[str] _CACHED_HW_INFO = None def _get_cpu():