Skip to content

Commit

Permalink
Apply suggestions from code review by @phackstock
Browse files Browse the repository at this point in the history
Co-authored-by: Philip Hackstock <[email protected]>
  • Loading branch information
danielhuppmann and phackstock authored Dec 19, 2024
1 parent d893527 commit 76e919c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nomenclature/codelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pandas as pd
import yaml
from pyam import IamDataFrame
from pyam.utils import is_list_like, write_sheet, pattern_match, to_list
from pyam.utils import is_list_like, write_sheet, pattern_match
from pydantic import BaseModel, ValidationInfo, field_validator
from pydantic_core import PydanticCustomError

Expand Down Expand Up @@ -622,7 +622,7 @@ def validate_units(
(variable, unit, self.mapping[variable].unit)
for variable, unit in unit_mapping.items()
if variable in self.variables
and unit not in to_list(self.mapping[variable].unit)
and unit not in self.mapping[variable].units
]:
lst = [
f"'{v}' - expected: {'one of ' if isinstance(e, list) else ''}"
Expand Down

0 comments on commit 76e919c

Please sign in to comment.