Allow AUTO_LOAD to be a function (#4550)

This commit is contained in:
Jesse Hills 2023-03-13 11:43:31 +13:00
parent b6f628ee40
commit 6e8e9c2aa9
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -71,7 +71,10 @@ class ComponentManifest:
@property
def auto_load(self) -> list[str]:
return getattr(self.module, "AUTO_LOAD", [])
al = getattr(self.module, "AUTO_LOAD", [])
if callable(al):
return al()
return al
@property
def codeowners(self) -> list[str]: