python: Fix base logic in MetaSimObject

This ensures `class Foo` is considered equivalent to `class
Foo(object)`.

Change-Id: I65a8aec27280a0806308bbc9d32281dfa6a8f84e
This commit is contained in:
Bobby R. Bruce
2023-10-10 11:46:56 -07:00
parent 298119e402
commit c4156b06fb

View File

@@ -231,7 +231,10 @@ class MetaSimObject(type):
"SimObjects do not support multiple inheritance"
)
base = bases[0]
# If the base class is not set, we assume type `object`. This ensures
# `class Foo(object): pass` is considered equivalent to
# `class Foo: pass`.
base = bases[0] if len(bases) > 0 else object
# Set up general inheritance via multidicts. A subclass will
# inherit all its settings from the base class. The only time