Skip to content

Commit

Permalink
Renamed internal method
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Nov 29, 2023
1 parent 201a2e4 commit fc1aeba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pint/facets/plain/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,10 +1063,10 @@ def parse_unit_name(
all non-equivalent combinations of (prefix, unit name, suffix)
"""
return self._dedup_candidates(
self._parse_unit_name(unit_name, case_sensitive=case_sensitive)
self._yield_unit_triplets(unit_name, case_sensitive=case_sensitive)
)

def _parse_unit_name(
def _yield_unit_triplets(
self, unit_name: str, case_sensitive: Optional[bool] = None
) -> Generator[tuple[str, str, str], None, None]:
"""Helper of parse_unit_name."""
Expand Down Expand Up @@ -1097,6 +1097,9 @@ def _parse_unit_name(
self._suffixes[suffix],
)

# TODO: keep this for backward compatibility
_parse_unit_name = _yield_unit_triplets

@staticmethod
def _dedup_candidates(
candidates: Iterable[tuple[str, str, str]]
Expand Down

0 comments on commit fc1aeba

Please sign in to comment.