From a685ef37411e8c1fb7ee7f594d398d98539969f6 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Mon, 8 Jun 2020 21:47:49 +0200 Subject: [PATCH] [ci] #118: Virtualenv path included to fix the import issues https://stackoverflow.com/questions/1899436/pylint-unable-to-import-error-how-to-set-pythonpath --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2dd1d4e0..ad83785b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,11 @@ pylint = "^2.4.2" sphinx = "^3.0.2" sphinx_rtd_theme = "^0.4.3" -[tool.pylint.messages_control] +# Trick for pylint CI job to not stumble upon E0401 and E1101 import issues +# This is the path of Poetry virtualenv in order to found the dependencies +[tool.pylint.master] +init-hook = "import sys; sys.path.append('/builds/clients/python/duniterpy/.venv')" + +#[tool.pylint.messages_control] disable = "C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613" enable = "C0121,C0202,C0321" -- GitLab