From 97109f01abf998a94d6f1ab09d2fc8acd3d5c1dc Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 7 Jul 2023 14:29:30 +0200 Subject: [PATCH] Install python linters --- .../provs/desktop/infrastructure/Python.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Python.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Python.kt index 4949970..b7036e4 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Python.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Python.kt @@ -13,6 +13,7 @@ fun Prov.provisionPython(venvHome: String? = "~/.venv/meissa") = task { installPybuilder(venvHome) installRestClient(venvHome) installJupyterlab(venvHome) + installLinters(venvHome) } fun Prov.installPython3(): ProvResult = task { @@ -41,6 +42,9 @@ fun Prov.installJupyterlab(venvHome: String? = null): ProvResult = task { pipInstall("jupyterlab pandas matplotlib", venvHome) } +fun Prov.installLinters(venvHome: String? = null): ProvResult = task { + pipInstall("flake8 mypy pylint", venvHome) +} private fun Prov.pipInstall(pkg: String, venvHome: String? = null) { cmd(activateVenvCommandPrefix(venvHome) + "pip3 install $pkg")