Skip to content

Commit a9927ac

Browse files
committed
kif_lib.model.value: Fix type of language argument of Text
1 parent 053c993 commit a9927ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kif_lib/model/value.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,15 +509,15 @@ def _check_arg_text(
509509
return cls(cls._check_arg_isinstance(
510510
arg, (cls, str), function, name, position))
511511

512-
def __init__(self, content: TText, language: Optional[TText] = None):
512+
def __init__(self, content: TText, language: Optional[str] = None):
513513
if isinstance(content, Text) and language is None:
514514
language = content.language
515515
super().__init__(content, language)
516516

517517
def _preprocess_arg(self, arg, i):
518-
if isinstance(arg, (String, Text)):
519-
arg = arg.args[0]
520518
if i == 1:
519+
if isinstance(arg, (String, Text)):
520+
arg = arg.args[0]
521521
return self._preprocess_arg_str(arg, i)
522522
elif i == 2:
523523
return self._preprocess_optional_arg_str(

0 commit comments

Comments
 (0)