This commit is contained in:
Marc Beninca 2024-09-16 11:14:40 +02:00
parent ca88e5bc1d
commit 450e10e2f4
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 20 additions and 1 deletions

View file

@ -1,3 +1,20 @@
"""Read Write eXecute.""" """Read Write eXecute."""
__version__ = "0.0.1" __version__ = "0.0.1"
class Class:
"""Root class."""
def __repr__(self) -> str:
"""Represent object variables.
:return: representation
:rtype: str
"""
name = self.__class__.__name__
attributes = [
f"{k}={v!r}" for k, v in vars(self).items() if not k.startswith("_")
]
arguments = ", ".join(attributes)
return f"{name}({arguments})"

View file

@ -3,8 +3,10 @@
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from pathlib import Path from pathlib import Path
from rwx import Class
class OS(ABC):
class OS(Class, ABC):
"""Operating System.""" """Operating System."""
def __init__(self, path: Path) -> None: def __init__(self, path: Path) -> None: