staticmethod

This commit is contained in:
Marc Beninca 2024-09-14 15:41:56 +02:00
parent 909e652f0d
commit 9c1136cfa0
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -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)