diff --git a/pint/facets/plain/registry.py b/pint/facets/plain/registry.py index 903620b2e..903fad9d1 100644 --- a/pint/facets/plain/registry.py +++ b/pint/facets/plain/registry.py @@ -1167,8 +1167,8 @@ def parse_units( def _parse_units( self, input_string: str, - as_delta: bool = True, - case_sensitive: Optional[bool] = None, + as_delta: bool, + case_sensitive: bool, ) -> UnitsContainer: """Parse a units expression and returns a UnitContainer with the canonical names. diff --git a/pint/util.py b/pint/util.py index e940ea6c2..1f7c29161 100644 --- a/pint/util.py +++ b/pint/util.py @@ -1039,8 +1039,7 @@ def to_units_container( return unit_like._units elif str in mro: if registry: - # TODO: Why not parse.units here? - return registry._parse_units(unit_like) + return registry.parse_units(unit_like)._units else: return ParserHelper.from_string(unit_like) elif dict in mro: