feat: add manager, entry and command

This commit is contained in:
2023-03-13 00:06:21 +03:00
parent a8788fbaf9
commit ccdbb00eff
11 changed files with 244 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
__all__ = ("Entry",)
import logging
from pathlib import Path
from typing import Optional
logger = logging.getLogger("entry")
class Entry:
_logger = logger
def __init__(self, entry_type: str, basepath: Path):
self._type = entry_type
self._basepath = basepath
def setup(self):
raise NotImplemented
def __repr__(self):
return f"{self._type} {str(self._basepath)}"
@classmethod
def detect(cls, basepath: Path) -> Optional["Entry"]:
raise NotImplemented