abc
This commit is contained in:
parent
9c1136cfa0
commit
e75a624c46
1 changed files with 3 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue