From 6609229c932c2d1c0dabbdd2db8c22d40464eef8 Mon Sep 17 00:00:00 2001 From: Guillaume Fraux Date: Tue, 19 May 2026 11:15:09 +0200 Subject: [PATCH] Allow creating the documentation-only classes Downstream code might create these at the top level, so erroring in the `__init__` means that is it not even possible to import the package for documentation --- .../metatomic_torch/metatomic/torch/documentation.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/metatomic_torch/metatomic/torch/documentation.py b/python/metatomic_torch/metatomic/torch/documentation.py index 7e06fd46f..87f4e6aba 100644 --- a/python/metatomic_torch/metatomic/torch/documentation.py +++ b/python/metatomic_torch/metatomic/torch/documentation.py @@ -209,7 +209,7 @@ def __init__( :param requestor: who requested this neighbors list, you can add additional requestors later using :py:meth:`add_requestor` """ - raise THIS_CODE_SHOULD_NOT_RUN + pass @property def cutoff(self) -> float: @@ -287,7 +287,7 @@ def __init__( explicit_gradients: List[str] = [], # noqa B006 description: str = "", ): - raise THIS_CODE_SHOULD_NOT_RUN + pass @property def quantity(self) -> str: @@ -360,7 +360,7 @@ def __init__( supported_devices: List[str] = [], # noqa B006 dtype: str = "", ): - raise THIS_CODE_SHOULD_NOT_RUN + pass @property def outputs(self) -> Dict[str, ModelOutput]: @@ -445,7 +445,7 @@ def __init__( outputs: Dict[str, ModelOutput] = {}, # noqa B006 selected_atoms: Optional[Labels] = None, ): - raise THIS_CODE_SHOULD_NOT_RUN + pass @property def length_unit(self) -> str: @@ -488,7 +488,7 @@ def __init__( references: Dict[str, List[str]] = {}, # noqa: B006 extra: Dict[str, str] = {}, # noqa: B006 ): - raise THIS_CODE_SHOULD_NOT_RUN + pass name: str """Name of this model"""