mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #5571 from ynput/bugfix/fix-warning-messages-about-overriden-init
Create Plugins: Better check of overriden '__init__' method
This commit is contained in:
commit
d851023836
1 changed files with 10 additions and 2 deletions
|
|
@ -214,8 +214,16 @@ class BaseCreator:
|
|||
# Backwards compatibility for system settings
|
||||
self.apply_settings(project_settings, system_settings)
|
||||
|
||||
init_overriden = self.__class__.__init__ is not BaseCreator.__init__
|
||||
if init_overriden or expect_system_settings:
|
||||
init_use_base = any(
|
||||
self.__class__.__init__ is cls.__init__
|
||||
for cls in {
|
||||
BaseCreator,
|
||||
Creator,
|
||||
HiddenCreator,
|
||||
AutoCreator,
|
||||
}
|
||||
)
|
||||
if not init_use_base or expect_system_settings:
|
||||
self.log.warning((
|
||||
"WARNING: Source - Create plugin {}."
|
||||
" System settings argument will not be passed to"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue