From 2e20bf6a983dfd4fcfad56aecb3ce41f53621b31 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Mon, 20 Jan 2020 16:33:03 +0100 Subject: Update invalid imports checker documentation Makes it consistent with other checkers we already have --- scripts/check_invalid_imports.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/check_invalid_imports.py b/scripts/check_invalid_imports.py index 121184e739..ba21b9f822 100644 --- a/scripts/check_invalid_imports.py +++ b/scripts/check_invalid_imports.py @@ -5,8 +5,13 @@ from pathlib import Path """ Run this file with the Cura project root as the working directory +Checks for invalid imports. When importing from plugins, there will be no problems when running from source, +but for some build types the plugins dir is not on the path, so relative imports should be used instead. eg: +from ..UltimakerCloudScope import UltimakerCloudScope <-- OK +import plugins.Toolbox.src ... <-- NOT OK """ + class InvalidImportsChecker: # compile regex REGEX = re.compile(r"^\s*(from plugins|import plugins)") -- cgit v1.2.3