Skip to content

Commit

Permalink
add (missing) __call__ and report methods to with_units
Browse files Browse the repository at this point in the history
  • Loading branch information
mefuller authored and bryanwweber committed Dec 24, 2023
1 parent 87317b7 commit 245e488
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions site_scons/site_tools/UnitsInterfaceBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ def __setattr__(self, name, value):
else:
setattr(self._phase, name, value)
def report(self, show_thermo=True, threshold=1e-14):
return self._phase.report(bool(show_thermo), threshold)
def __call__(self, *args, **kwargs):
print(self.report(*args, **kwargs))
@property
def basis_units(self):
\"\"\"The units associated with the mass/molar basis of this phase.\"\"\"
Expand Down

0 comments on commit 245e488

Please sign in to comment.