Cleanup flow control for detecting nuclides

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Olek 2022-09-01 14:33:44 -05:00 committed by GitHub
parent 85c5c791d6
commit 2d01241b53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -438,8 +438,7 @@ class Material(IDManagerMixin):
params['percent_type'] = percent_type
## check if nuclide
if str.isdigit(component[-1]) or (component[-1] == 'm'
and str.isdigit(component[-2])):
if not str.isalpha():
self.add_nuclide(component, **params)
else: # is element
kwargs = params