blob: c58a8e16d90dd148cc653c7a7f31756d27a6c49e (
plain)
1
2
3
4
5
6
7
8
9
|
# hatch_build.py is executed by hatch at build-time and can contain custom build logic hooks
from hatchling.metadata.plugin.interface import MetadataHookInterface
class CustomMetadataHook(MetadataHookInterface):
"""Custom metadata hook for hatch that ensures that gitlint and gitlint-core[trusted-deps] versions always match"""
def update(self, metadata: dict) -> None:
metadata["dependencies"] = [f"gitlint-core[trusted-deps]=={metadata['version']}"]
|