staticmethod
This commit is contained in:
parent
909e652f0d
commit
9c1136cfa0
1 changed files with 10 additions and 5 deletions
|
@ -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:
|
||||
@staticmethod
|
||||
def from_path(path: Path) -> OS:
|
||||
"""Initialize from an already existing path."""
|
||||
return Debian(path)
|
||||
|
|
Loading…
Reference in a new issue