From 64b8d94ec3d477c4bc3c84032ec76f36bfeff6e8 Mon Sep 17 00:00:00 2001 From: robjmcgibbon Date: Thu, 12 Sep 2024 18:44:04 +0100 Subject: [PATCH] Format --- swiftsimio/objects.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/swiftsimio/objects.py b/swiftsimio/objects.py index 876dc1c4..774ed258 100644 --- a/swiftsimio/objects.py +++ b/swiftsimio/objects.py @@ -106,10 +106,12 @@ # The scale factor! a = sympy.symbols("a") + class InvalidConversionError(Exception): def __init__(self, message="Could not convert to comoving coordinates"): self.message = message + def _propagate_cosmo_array_attributes(func): def wrapped(self, *args, **kwargs): ret = func(self, *args, **kwargs) @@ -818,7 +820,9 @@ def __new__( not obj.comoving ), "Cosmo arrays without a valid transform to comoving units must be physical" if obj.comoving: - assert obj.valid_transform, "Comoving Cosmo arrays must be able to be transformed to physical" + assert ( + obj.valid_transform + ), "Comoving Cosmo arrays must be able to be transformed to physical" return obj