mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 03:38:59 +08:00
Attempt to appease mypy
This commit is contained in:
parent
3bb3b69082
commit
ddd7d15287
@ -348,10 +348,11 @@ class PostProcessingPlugin(QObject, Extension):
|
||||
# No signature needed
|
||||
return True
|
||||
|
||||
dir_path = os.path.split(file_path)[0]
|
||||
if dir_path == os.path.join(
|
||||
PluginRegistry.getInstance().getPluginPath("PostProcessingPlugin"),
|
||||
"scripts"):
|
||||
dir_path = os.path.split(file_path)[0] # type: str
|
||||
plugin_path = PluginRegistry.getInstance().getPluginPath("PostProcessingPlugin")
|
||||
assert plugin_path is not None # appease mypy
|
||||
bundled_path = os.path.join(plugin_path, "scripts")
|
||||
if dir_path == bundled_path:
|
||||
# Bundled scripts are trusted.
|
||||
return True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user