diff --git a/rwx/os/__init__.py b/rwx/os/__init__.py index 3bd3c15..d13857c 100644 --- a/rwx/os/__init__.py +++ b/rwx/os/__init__.py @@ -1,10 +1,15 @@ """Control Operating Systems.""" -from pathlib import Path +from __future__ import annotations + +from typing import TYPE_CHECKING from rwx.err import Error from rwx.os.debian import Debian +if TYPE_CHECKING: + from pathlib import Path + class OS: """Operating System.""" @@ -18,7 +23,7 @@ class OS: """Return mandatory name.""" raise Error - -def from_path(path: Path) -> OS: - """Initialize from an already existing path.""" - return Debian(path) + @staticmethod + def from_path(path: Path) -> OS: + """Initialize from an already existing path.""" + return Debian(path)