mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +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
|
# Backwards compatibility for system settings
|
||||||
self.apply_settings(project_settings, system_settings)
|
self.apply_settings(project_settings, system_settings)
|
||||||
|
|
||||||
init_overriden = self.__class__.__init__ is not BaseCreator.__init__
|
init_use_base = any(
|
||||||
if init_overriden or expect_system_settings:
|
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((
|
self.log.warning((
|
||||||
"WARNING: Source - Create plugin {}."
|
"WARNING: Source - Create plugin {}."
|
||||||
" System settings argument will not be passed to"
|
" System settings argument will not be passed to"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue