Skip to content

Commit

Permalink
kif_lib.model.value: Fix type of language argument of Text
Browse files Browse the repository at this point in the history
  • Loading branch information
gflima committed Mar 27, 2024
1 parent 053c993 commit a9927ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kif_lib/model/value.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,15 +509,15 @@ def _check_arg_text(
return cls(cls._check_arg_isinstance(
arg, (cls, str), function, name, position))

def __init__(self, content: TText, language: Optional[TText] = None):
def __init__(self, content: TText, language: Optional[str] = None):
if isinstance(content, Text) and language is None:
language = content.language
super().__init__(content, language)

def _preprocess_arg(self, arg, i):
if isinstance(arg, (String, Text)):
arg = arg.args[0]
if i == 1:
if isinstance(arg, (String, Text)):
arg = arg.args[0]
return self._preprocess_arg_str(arg, i)
elif i == 2:
return self._preprocess_optional_arg_str(
Expand Down

0 comments on commit a9927ac

Please sign in to comment.