Save and Load Utility modules
reload
- blint.save_load.reload.reload_issues(context)
Reload issues
- blint.save_load.reload.reload_rules(context)
Reloads rules from BLint’s config file, if exists.
- Parameters:
context – Blender’s context
- Raises:
FileNotFoundError – rule config file does not exist
save_load_util
- blint.save_load.save_load_util.get_config_filepath(context)
Gets the currently set rule config file.
- blint.save_load.save_load_util.does_config_exist(context)
Checks if rule config file is set and exists as a file.
- blint.save_load.save_load_util.import_lint_rules(lint_rules, rule_properties, existing_rules=None)
Adds a list of rules to a bpy collection of LintRule items.
- Parameters:
lint_rules (
list
[dict
]) – lint rules to import.rule_properties (
CollectionProperty
) – LintRule property collection.existing_rules (
dict
[str
]) – dict of existing rule names, to prevent duplicate additions.
- blint.save_load.save_load_util.save_external_rules(context, filepath=None)
Saves rules to external JSON file.
- Parameters:
context – Blender’s context
security
- blint.save_load.security.security_check(expression)
Checks if there is insecure code, specifically
eval()
andexec()
, otherwise returns nothing.- Parameters:
expression (
str
) – Python code in the form of a string.- Raises:
ValueError – if expression contains insecure code.