Update invalid imports checker documentation

Makes it consistent with other checkers we already have
This commit is contained in:
Nino van Hooff 2020-01-20 16:33:03 +01:00
parent b830a6faa3
commit 2e20bf6a98
2 changed files with 6 additions and 1 deletions

View file

@ -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)")