mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 19:24:23 +00:00
Introduce MOD_HEADER constante in all modules as mandatory constante.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from abc import ABC, abstractmethod, abstractproperty
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
from dataclasses import dataclass
|
||||
from mods.clone.schemas import ModConfModel
|
||||
@@ -84,6 +84,8 @@ class IModule(ABC):
|
||||
def inspect_class(self):
|
||||
if not hasattr(self, 'ModConfig'):
|
||||
raise AttributeError("The Module must init ModConfig attribute in the load method!")
|
||||
if not hasattr(self, 'MOD_HEADER'):
|
||||
raise NotImplementedError(f"You must declare the header of the module in {self.__class__.__name__}!")
|
||||
|
||||
@abstractmethod
|
||||
def create_tables(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user