feat: update logging

This commit is contained in:
2023-03-14 23:59:58 +03:00
parent ccdbb00eff
commit 9345b27aef
9 changed files with 180 additions and 31 deletions
+21 -2
View File
@@ -1,4 +1,7 @@
__all__ = ("Entry",)
__all__ = (
"EntryCommandNotImplementedError",
"Entry",
)
import logging
@@ -8,6 +11,10 @@ from typing import Optional
logger = logging.getLogger("entry")
class EntryCommandNotImplementedError(NotImplementedError):
pass
class Entry:
_logger = logger
@@ -16,7 +23,19 @@ class Entry:
self._basepath = basepath
def setup(self):
raise NotImplemented
raise EntryCommandNotImplementedError("setup")
def lint(self):
raise EntryCommandNotImplementedError("lint")
def format(self):
raise EntryCommandNotImplementedError("format")
def test(self):
raise EntryCommandNotImplementedError("test")
def show(self):
self._logger.info(f"{self}")
def __repr__(self):
return f"{self._type} {str(self._basepath)}"