Skip to content

Commit

Permalink
Fix LiteralString import for old Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
glatterf42 committed Sep 24, 2024
1 parent 9f59b5c commit 8feb8b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion message_ix/util/sankey.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, List, LiteralString, Optional, Tuple, Union
from typing import Any, List, Optional, Tuple, Union

from pyam import IamDataFrame

Expand All @@ -7,6 +7,11 @@
except ImportError: # Python < 3.10, pandas < 2.0
from pyam.utils import get_variable_components

try:
from typing import LiteralString
except ImportError: # Python < 3.11
from typing_extensions import LiteralString


def map_for_sankey(
iam_df: IamDataFrame,
Expand Down

0 comments on commit 8feb8b2

Please sign in to comment.