Assume main class is in last module instead of first

This commit is contained in:
Tulir Asokan 2024-03-30 23:31:40 +02:00
parent 2c60342cc6
commit 7759643e93
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ class ZippedPluginLoader(PluginLoader):
if "/" in meta.main_class:
self.main_module, self.main_class = meta.main_class.split("/")[:2]
else:
self.main_module = meta.modules[0]
self.main_module = meta.modules[-1]
self.main_class = meta.main_class
self._file = file

View File

@ -115,7 +115,7 @@ with open(args.meta, "r") as meta_file:
if "/" in meta.main_class:
module, main_class = meta.main_class.split("/", 1)
else:
module = meta.modules[0]
module = meta.modules[-1]
main_class = meta.main_class
if args.meta != "maubot.yaml" and os.path.dirname(args.meta) != "":