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

View file

@ -2,16 +2,16 @@
from __future__ import annotations from __future__ import annotations
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
from rwx.err import Error
from rwx.os.debian import Debian from rwx.os.debian import Debian
if TYPE_CHECKING: if TYPE_CHECKING:
from pathlib import Path from pathlib import Path
class OS: class OS(ABC):
"""Operating System.""" """Operating System."""
def __init__(self, path: Path) -> None: def __init__(self, path: Path) -> None:
@ -19,9 +19,9 @@ class OS:
self.root = path self.root = path
self.name = self.get_name() self.name = self.get_name()
@abstractmethod
def get_name(self) -> str: def get_name(self) -> str:
"""Return mandatory name.""" """Return mandatory name."""
raise Error
@staticmethod @staticmethod
def from_path(path: Path) -> OS: def from_path(path: Path) -> OS: