diff --git a/rwx/__init__.py b/rwx/__init__.py index 50c7cbe..3dbfd68 100644 --- a/rwx/__init__.py +++ b/rwx/__init__.py @@ -5,8 +5,8 @@ __version__ = "0.0.1" from os import linesep -class Class: - """Root class.""" +class Object: + """Root object.""" def __repr__(self) -> str: """Return machine-readable state. diff --git a/rwx/err/__init__.py b/rwx/err/__init__.py index 53a63c7..6c473e0 100644 --- a/rwx/err/__init__.py +++ b/rwx/err/__init__.py @@ -1,7 +1,7 @@ """Handle errors.""" -from rwx import Class +from rwx import Object -class Error(Class, Exception): +class Error(Object, Exception): """Parent class for all errors.""" diff --git a/rwx/os/abstract.py b/rwx/os/abstract.py index 77f9cb1..98f3f0d 100644 --- a/rwx/os/abstract.py +++ b/rwx/os/abstract.py @@ -3,10 +3,10 @@ from abc import ABC, abstractmethod from pathlib import Path -from rwx import Class +from rwx import Object -class OS(Class, ABC): +class OS(Object, ABC): """Operating System.""" def __init__(self, path: Path) -> None: diff --git a/rwx/os/pm/__init__.py b/rwx/os/pm/__init__.py index c55179a..785ce74 100644 --- a/rwx/os/pm/__init__.py +++ b/rwx/os/pm/__init__.py @@ -2,11 +2,11 @@ from abc import ABC, abstractmethod -from rwx import Class +from rwx import Object from rwx.ps import Command -class PM(Class, ABC): +class PM(Object, ABC): """Package Manager.""" def __init__(self) -> None: diff --git a/rwx/prj/__init__.py b/rwx/prj/__init__.py index cfbe3ae..62d91d9 100644 --- a/rwx/prj/__init__.py +++ b/rwx/prj/__init__.py @@ -2,10 +2,10 @@ from pathlib import Path -from rwx import Class +from rwx import Object -class Project(Class): +class Project(Object): """Parent class for any type of project.""" def __init__(self, file: Path) -> None: diff --git a/rwx/ps/__init__.py b/rwx/ps/__init__.py index 821b9e3..82c9640 100644 --- a/rwx/ps/__init__.py +++ b/rwx/ps/__init__.py @@ -2,10 +2,10 @@ import subprocess -from rwx import Class, txt +from rwx import Object, txt -class Command(Class): +class Command(Object): """Command to run.""" def __init__(self, *arguments: str | tuple[str, ...]) -> None: diff --git a/rwx/sw/freetube/artists.py b/rwx/sw/freetube/artists.py new file mode 100644 index 0000000..2981245 --- /dev/null +++ b/rwx/sw/freetube/artists.py @@ -0,0 +1,18 @@ +"""FreeTube artists.""" + +from rwx import Object + + +class Artist(Object): + """FreeTube artist.""" + + def __init__(self, uid: str, name: str) -> None: + """Set uid & name. + + :param uid: identifier + :type uid: str + :param name: label + :type name: str + """ + self.uid = uid + self.name = name diff --git a/rwx/sw/freetube/channels.py b/rwx/sw/freetube/channels.py index 30777e9..556dea7 100644 --- a/rwx/sw/freetube/channels.py +++ b/rwx/sw/freetube/channels.py @@ -1,9 +1,9 @@ """FreeTube channels.""" -from rwx import Class +from rwx import Object -class Channel(Class): +class Channel(Object): """FreeTube channel.""" def __init__(self, uid: str, name: str) -> None: diff --git a/rwx/sw/freetube/playlists.py b/rwx/sw/freetube/playlists.py index 4183336..f4b17de 100644 --- a/rwx/sw/freetube/playlists.py +++ b/rwx/sw/freetube/playlists.py @@ -1,11 +1,11 @@ """FreeTube playlists.""" -from rwx import Class +from rwx import Object from .videos import Video -class Playlist(Class): +class Playlist(Object): """FreeTube playlist.""" def __init__(self, uid: str, name: str) -> None: diff --git a/rwx/sw/freetube/profiles.py b/rwx/sw/freetube/profiles.py index ffb0adc..e164296 100644 --- a/rwx/sw/freetube/profiles.py +++ b/rwx/sw/freetube/profiles.py @@ -1,11 +1,11 @@ """FreeTube profiles.""" -from rwx import Class +from rwx import Object from .channels import Channel -class Profile(Class): +class Profile(Object): """FreeTube profile.""" def __init__(self, uid: str, name: str) -> None: diff --git a/rwx/sw/freetube/settings.py b/rwx/sw/freetube/settings.py index 67bb084..621454b 100644 --- a/rwx/sw/freetube/settings.py +++ b/rwx/sw/freetube/settings.py @@ -1,11 +1,11 @@ """FreeTube settings.""" -from rwx import Class +from rwx import Object from .db import to_db -class Setting(Class): +class Setting(Object): """FreeTube setting.""" def __init__(self, uid: str, value: object) -> None: diff --git a/rwx/sw/freetube/videos.py b/rwx/sw/freetube/videos.py index 8a53713..6003c75 100644 --- a/rwx/sw/freetube/videos.py +++ b/rwx/sw/freetube/videos.py @@ -1,9 +1,9 @@ """FreeTube videos.""" -from rwx import Class +from rwx import Object -class Video(Class): +class Video(Object): """FreeTube video.""" def __init__(self, uid: str, name: str) -> None: