feat: update logging
This commit is contained in:
@@ -12,10 +12,22 @@ class PythonEntry(Entry):
|
||||
super().__init__(self.TYPE, basepath)
|
||||
|
||||
def setup(self):
|
||||
self._logger.info(f"setup:{self}")
|
||||
self._logger.info(f"setup {self}")
|
||||
PoetryCommand.env_use("3.8").run(self._basepath)
|
||||
PoetryCommand.install().run(self._basepath)
|
||||
|
||||
def lint(self):
|
||||
self._logger.info(f"lint {self}")
|
||||
PoetryCommand("run", "black", "--check", "--diff", "./").run(self._basepath)
|
||||
PoetryCommand("run", "isort", "--profile", "black", "--check-only", "./").run(
|
||||
self._basepath
|
||||
)
|
||||
|
||||
def format(self):
|
||||
self._logger.info(f"format {self}")
|
||||
PoetryCommand("run", "isort", "./").run(self._basepath)
|
||||
PoetryCommand("run", "black", "./").run(self._basepath)
|
||||
|
||||
@classmethod
|
||||
def detect(cls, basepath: Path) -> Optional["PythonEntry"]:
|
||||
if (basepath / "pyproject.toml").exists():
|
||||
|
||||
Reference in New Issue
Block a user