feat: update logging
This commit is contained in:
@@ -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)}"
|
||||
|
||||
Reference in New Issue
Block a user