From f6ceaa99c8429be52ebeaef6edd24731a95f6082 Mon Sep 17 00:00:00 2001 From: Harshal Pohekar <106588300+hpohekar@users.noreply.github.com> Date: Wed, 5 Jun 2024 19:58:05 +0530 Subject: [PATCH] fix: Do not filter out ' in string quantity type (#2915) --- src/ansys/fluent/core/solver/flunits.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ansys/fluent/core/solver/flunits.py b/src/ansys/fluent/core/solver/flunits.py index 20945c69d0b..d80d7d64cf7 100644 --- a/src/ansys/fluent/core/solver/flunits.py +++ b/src/ansys/fluent/core/solver/flunits.py @@ -269,11 +269,7 @@ def get_si_unit_for_fluent_quantity( # attribute only for dimensionless variables if quantity is None: return "" - try: - if quantity.startswith("'"): - quantity = quantity[1:] - except AttributeError: - # not a string + if not isinstance(quantity, str): raise InvalidQuantityType(quantity) try: return (unit_table or _fl_unit_table)[quantity]