villebro commented on code in PR #30398:
URL: https://github.com/apache/superset/pull/30398#discussion_r1777447705
##########
superset/models/core.py:
##########
@@ -102,7 +102,7 @@ class KeyValue(Model): # pylint:
disable=too-few-public-methods
value = Column(utils.MediumText(), nullable=False)
-class CssTemplate(Model, AuditMixinNullable):
+class CssTemplate(Model, AuditMixinNullable, UUIDMixin):
Review Comment:
This was already incorrect, but in general it's idiomatic to place the mixin
_before_ the main class to ensure MRO (otherwise functionality in the main
class will overwrite functionality in the mixin):
```suggestion
class CssTemplate(AuditMixinNullable, UUIDMixin, Model):
```
##########
superset/models/helpers.py:
##########
@@ -167,11 +167,17 @@ def convert_uuids(obj: Any) -> Any:
return obj
-class ImportExportMixin:
+class UUIDMixin: # pylint: disable=too-few-public-methods
Review Comment:
Nice clarification!
##########
superset/models/core.py:
##########
@@ -1174,7 +1174,7 @@ class FavStarClassName(StrEnum):
DASHBOARD = "Dashboard"
-class FavStar(Model): # pylint: disable=too-few-public-methods
+class FavStar(Model, UUIDMixin):
Review Comment:
Same here:
```suggestion
class FavStar(UUIDMixin, Model):
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]