class,os
This commit is contained in:
parent
ca88e5bc1d
commit
450e10e2f4
2 changed files with 20 additions and 1 deletions
|
@ -1,3 +1,20 @@
|
|||
"""Read Write eXecute."""
|
||||
|
||||
__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})"
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
from abc import ABC, abstractmethod
|
||||
from pathlib import Path
|
||||
|
||||
from rwx import Class
|
||||
|
||||
class OS(ABC):
|
||||
|
||||
class OS(Class, ABC):
|
||||
"""Operating System."""
|
||||
|
||||
def __init__(self, path: Path) -> None:
|
||||
|
|
Loading…
Reference in a new issue