From 934835f93c135ffd918224bf278cc9efb20dce6d Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 24 Oct 2023 15:00:19 -0400 Subject: [PATCH] proper return value when lacking lattice information --- python/damask/_crystal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/_crystal.py b/python/damask/_crystal.py index 5edc4c3f6..42dd5a4aa 100644 --- a/python/damask/_crystal.py +++ b/python/damask/_crystal.py @@ -565,9 +565,9 @@ class Crystal(): self.family == other.family) @property - def parameters(self) -> Tuple: + def parameters(self) -> Optional[Tuple]: """Return lattice parameters a, b, c, alpha, beta, gamma.""" - return (self.a,self.b,self.c,self.alpha,self.beta,self.gamma) if hasattr(self,'a') else () + return (self.a,self.b,self.c,self.alpha,self.beta,self.gamma) if hasattr(self,'a') else None @property def immutable(self) -> Dict[str, float]: