diff --git a/pyarchitecture/__init__.py b/pyarchitecture/__init__.py index 200d8f5..c010686 100644 --- a/pyarchitecture/__init__.py +++ b/pyarchitecture/__init__.py @@ -5,7 +5,7 @@ from pyarchitecture import cpu, disks, gpu, memory -version = "0.1.0a2" +version = "0.1.0a3" def all_components() -> Dict[str, Any]: diff --git a/pyarchitecture/cpu/__init__.py b/pyarchitecture/cpu/__init__.py index c1ebfab..04235cc 100644 --- a/pyarchitecture/cpu/__init__.py +++ b/pyarchitecture/cpu/__init__.py @@ -39,6 +39,6 @@ def get_cpu_info(cpu_lib: str | os.PathLike = None) -> Dict[str, int | str]: return { "name": cpu_name, "logical_cores": cpu_count, - "physical_cores": cpu_count / 2 if cpu_count >= 2 else 1, + "physical_cores": int(cpu_count / 2) if cpu_count >= 2 else 1, } LOGGER.error(f"CPU library {library_path!r} doesn't exist") diff --git a/pyarchitecture/memory/__init__.py b/pyarchitecture/memory/__init__.py index 5214c83..b5fe395 100644 --- a/pyarchitecture/memory/__init__.py +++ b/pyarchitecture/memory/__init__.py @@ -42,7 +42,7 @@ def get_memory_info( models.OperatingSystem.windows: windows.get_memory_info, } library_path = _get_mem_lib(mem_lib) - if os.path.isfile(library_path) : + if os.path.isfile(library_path): raw_info = os_map[models.OPERATING_SYSTEM](library_path) if humanize: return {k: squire.size_converter(v) for k, v in raw_info.items()}