docstrings and abstract method

This commit is contained in:
Ondrej Samohel 2020-09-22 16:12:25 +02:00
parent 4db75b45e5
commit b4080ebbe2
No known key found for this signature in database
GPG key ID: 8A29C663C672C2B7
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from .base import PypeModule
__all__ = (

View file

@ -1,10 +1,19 @@
# -*- coding: utf-8 -*-
"""Base class for Pype Modules."""
from uuid import uuid4
from abc import ABC
from abc import ABC, abstractmethod
from pype.api import Logger
class PypeModule(ABC):
"""Base class of pype module."""
"""Base class of pype module.
Attributes:
id (UUID): Module id.
enabled (bool): Is module enabled.
name (str): Module name.
"""
enabled = False
name = None
_id = None
@ -23,5 +32,7 @@ class PypeModule(ABC):
def id(self):
return self._id
@abstractmethod
def startup_environments(self):
"""Get startup environments for module."""
return {}