From 8f41bfb54f16402c22a04a408288a563f802560b Mon Sep 17 00:00:00 2001 From: Antony Lewis Date: Mon, 4 Nov 2024 20:03:22 +0000 Subject: [PATCH] minor --- cobaya/component.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cobaya/component.py b/cobaya/component.py index 0779f7bf..f5ab7feb 100644 --- a/cobaya/component.py +++ b/cobaya/component.py @@ -316,6 +316,7 @@ def get_annotations(cls) -> InfoDict: if issubclass(base, HasDefaults) and base is not HasDefaults: d.update(base.get_annotations()) + # from Python 10 should use just cls.__annotations__ d.update({k: v for k, v in cls.__dict__.get("__annotations__", {}).items() if not k.startswith('_')}) return d