mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Update invalid imports checker documentation
Makes it consistent with other checkers we already have
This commit is contained in:
parent
b830a6faa3
commit
2e20bf6a98
2 changed files with 6 additions and 1 deletions
|
@ -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)")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue