From c8e262a736a70351508922dd48b825616b088bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Wed, 18 Jun 2025 04:47:48 +0200 Subject: [PATCH] Remove copyright header and ensure flexibility in VolumeConfig by allowing extra fields --- src/compose/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compose/__init__.py b/src/compose/__init__.py index 867f7c0..74125c8 100644 --- a/src/compose/__init__.py +++ b/src/compose/__init__.py @@ -1,6 +1,3 @@ -# Copyright (c) 2023, the Compose project contributors. -# SPDX-License-Identifier: GPL-3.0-or-later - """Docker Compose YAML file generator. This package provides utilities for programmatically creating and managing Docker Compose @@ -51,6 +48,9 @@ class VolumeConfig(BaseModel): labels: dict[str, str] | list[str] | None = None name: str | None = None + # Allow extra fields for flexibility and to support arbitrary Docker Compose extensions. + model_config = {"extra": "allow"} + class NetworkConfig(BaseModel): """Represents a network configuration for a Docker Compose file."""