From e75a624c466b77d05b781f760dd3d9536483892e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 14 Sep 2024 15:45:44 +0200 Subject: [PATCH] abc --- rwx/os/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rwx/os/__init__.py b/rwx/os/__init__.py index d13857c..1594cbb 100644 --- a/rwx/os/__init__.py +++ b/rwx/os/__init__.py @@ -2,16 +2,16 @@ from __future__ import annotations +from abc import ABC, abstractmethod 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: +class OS(ABC): """Operating System.""" def __init__(self, path: Path) -> None: @@ -19,9 +19,9 @@ class OS: self.root = path self.name = self.get_name() + @abstractmethod def get_name(self) -> str: """Return mandatory name.""" - raise Error @staticmethod def from_path(path: Path) -> OS: