diff options
author | Nino van Hooff <ninovanhooff@gmail.com> | 2020-01-20 18:33:03 +0300 |
---|---|---|
committer | Nino van Hooff <ninovanhooff@gmail.com> | 2020-01-20 18:35:32 +0300 |
commit | 2e20bf6a983dfd4fcfad56aecb3ce41f53621b31 (patch) | |
tree | 7019fcfa1f00db489f052497bc2f646a26e530eb /scripts | |
parent | b830a6faa3f83814b795fdca41bb73b90e48ac68 (diff) |
Update invalid imports checker documentation
Makes it consistent with other checkers we already have
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/check_invalid_imports.py | 5 |
1 files changed, 5 insertions, 0 deletions
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)") |