Source code in backend/src/hatchling/metadata/plugin/interface.py
classMetadataHookInterface(ABC):# no cov""" Example usage: ```python tab="plugin.py" from hatchling.metadata.plugin.interface import MetadataHookInterface class SpecialMetadataHook(MetadataHookInterface): PLUGIN_NAME = 'special' ... ``` ```python tab="hooks.py" from hatchling.plugin import hookimpl from .plugin import SpecialMetadataHook @hookimpl def hatch_register_metadata_hook(): return SpecialMetadataHook ``` """PLUGIN_NAME=''"""The name used for selection."""def__init__(self,root:str,config:dict)->None:self.__root=rootself.__config=config@propertydefroot(self)->str:""" The root of the project tree. """returnself.__root@propertydefconfig(self)->dict:""" The hook configuration. ```toml config-example [tool.hatch.metadata.hooks.<PLUGIN_NAME>] ``` """returnself.__config@abstractmethoddefupdate(self,metadata:dict)->None:""" This updates the metadata mapping of the `project` table in-place. """defget_known_classifiers(self)->list[str]:# noqa: PLR6301""" This returns extra classifiers that should be considered valid in addition to the ones known to PyPI. """return[]
This returns extra classifiers that should be considered valid in addition to the ones known to PyPI.
Source code in backend/src/hatchling/metadata/plugin/interface.py
defget_known_classifiers(self)->list[str]:# noqa: PLR6301""" This returns extra classifiers that should be considered valid in addition to the ones known to PyPI. """return[]