Skip to content

Commit

Permalink
Cast silent-int values as int explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
glatterf42 committed Oct 15, 2024
1 parent d6c8dc2 commit f14f9f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions message_ix/tools/add_year/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ def add_year(
cat_year_new: pd.DataFrame = sc_new.set("cat_year")
firstmodelyear_new = cat_year_new.query("type_year == 'firstmodelyear'")
firstyr_new: int = (
min(cat_year_new["year"])
int(min(cat_year_new["year"]))
if firstmodelyear_new.empty
else firstmodelyear_new["year"]
else int(firstmodelyear_new["year"].item())
) # type: ignore
# assert isinstance(firstyear_new, int)

Expand Down

0 comments on commit f14f9f8

Please sign in to comment.