Reference template

This commit is contained in:
MaXFeeD
2025-05-26 20:58:16 +03:00
parent d28e2d17bb
commit 66882a57ac
2 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import os import os
from copy import deepcopy from copy import deepcopy
from os.path import abspath, dirname, isfile, join, splitdrive from os.path import abspath, dirname, isfile, join, splitdrive
from typing import Iterable, Optional, Union from typing import Iterable, Optional
from .config import Config, FileConfig from .config import Config, FileConfig
+11 -2
View File
@@ -166,13 +166,22 @@ class MakeDataConfig(FileConfig, metaclass=ABCMeta):
""" """
return False return False
def iterate_dependencies(self) -> Iterable['MakeDataConfig']:
"""Each project may contain dependencies that must be compiled before that project itself.
When instantiating a config, toolchain will make a dependency graph first, and only then build your project.
Returns:
Iterable[MakeDataConfig]: optional project data on which manifest is based
"""
...
@abstractmethod @abstractmethod
def obtain_project_data(self) -> Optional[Union[MakeModData, MakePackData]]: def obtain_project_data(self) -> Optional[Union[MakeModData, MakePackData]]:
"""Basic data describing this config and project as a whole. They should be provided in any case. """Basic data describing this config and project as a whole. They should be provided in any case.
If there is no value, no built-in startup configurations are created. If there is no value, no built-in startup configurations are created.
Returns: Returns:
Union[MakeModData, MakePackData]: project data on which manifest is based Optional[Union[MakeModData, MakePackData]]: optional project data on which manifest is based
""" """
... ...
@@ -352,7 +361,7 @@ class MakeDataConfig(FileConfig, metaclass=ABCMeta):
Args: Args:
criteria (Union[str, Callable[[str], bool]]): filter configs by filename or deeper callable inspection criteria (Union[str, Callable[[str], bool]]): filter configs by filename or deeper callable inspection
data (type['MakeDataConfig']): type to be created, which will become a config with data data (type[MakeDataConfig]): type to be created, which will become a config with data
Raises: Raises:
ValueError: if this criteria has already been registered earlier ValueError: if this criteria has already been registered earlier